public void sendPacketAsync(OutputPacket op) { if (op.getLength() > Global.MAX_OUTPUT_PACKET_LEN) { Console.WriteLine("sendPacket length is greater than MAX_PACKET_LEN"); return; } try { usrSocket.BeginSend(op.wrapPacket(), 0, op.getLength(), SocketFlags.None, sendPacketComplete, null); } catch (Exception e) { close(); } }