/// <summary>
 /// Register the handler to the array list.
 /// </summary>
 /// <param name="code"> code byte/packet id </param>
 /// <param name="handler"> handler want to register. </param>
 public virtual void RegisterHandler(JCS_RecvPacketType code, JCS_PacketHandler handler)
 {
     mHandlers[(int)code] = handler;
 }
Beispiel #2
0
 /// <summary>
 /// Track this packet. If the packet does not responed.
 /// keep sending the packet until the packet responed by the
 /// server.
 ///
 /// ATTENTION(jenchieh): Use this function carefully, if you
 /// pass in the wrong respond packet id. Packet will be track
 /// forever until the program terminated.
 /// </summary>
 /// <param name="packet"> Packet to send over time in order to track. </param>
 /// <param name="respondPacketId"> Packet id to check to stop the responsed. </param>
 public void AddTrack(JCS_Packet packet, JCS_RecvPacketType respondPacketId)
 {
     AddTrack(packet, (short)respondPacketId);
 }