public static Decode ( byte data, PBChannel t_query, object &msg, int &id ) : bool | ||
data | byte | 字节数据 |
t_query | PBChannel | 消息(id->type)查询函数 |
msg | object | 返回的消息object |
id | int | 返回的消息id |
리턴 | bool |
public IMessage Decode(byte[] data) { uint id; IMessage msg; PBCodec.Decode(data, msgtype_query_, out msg, out id); return(msg); }
public object Decode(byte[] data) { int id; object msg; PBCodec.Decode(data, msgtype_query_, out msg, out id); return(msg); }
public void Dispatch(int from_handle, uint seq, byte[] data) { uint id; IMessage msg; if (PBCodec.Decode(data, msgtype_query_, out msg, out id)) { IPBHandler h; if (handlers_.TryGetValue(id, out h)) { h.Execute(msg, this, from_handle, seq); } else if (null != default_handler_) { default_handler_(msg, this, from_handle, seq); } } }