示例#1
0
 /// <summary>
 /// Sends data to this instance
 /// </summary>
 /// <param name="Data">The data to be send</param>
 public void sendData(ClientOutgoingPacket data)
 {
     try
     {
         //convert packet to raw byte data
         byte[] dataBytes = data.GetPacketData();
         //send da shit
         this.dataSocket.BeginSend(dataBytes, 0, dataBytes.Length, 0, new AsyncCallback(sentData), this.dataSocket);
     }
     catch
     {
         disconnect();
     }
 }
示例#2
0
 public AbstractNoDataPacket(ServerOpCode code)
 {
     this.packet = new ClientOutgoingPacket(code);
 }