public static Decode ( byte message ) : object | ||
message | byte | |
Результат | object |
public static object Decode(byte[] message)
{
object r = null;
int l = 0;
try
{
r = bdecode_rec(message, ref l);
}
//TODO: Work out what type of expection is thrown when the bencoded file is too short
catch // IndexError
{
throw new Exception("ValueError");
}
if (l != message.Length)
{
//throw new BitTorrentException("BEncoded message is too long");
}
return r;
}