Example #1
0
        private static void Send(Socket socket, ChatPDU chatPdu)
        {
            var bytes = chatPdu.Serialize();

            try
            {
                var position = 0;
                do
                {
                    position += socket.Send(bytes, position, bytes.Length - position, SocketFlags.None);
                } while (position < bytes.Length);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
 public void Send(ChatPDU pdu)
 {
 }