Example #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();
     }
 }
 public AbstractNoDataPacket(ServerOpCode code)
 {
     this.packet = new ClientOutgoingPacket(code);
 }