Exemplo n.º 1
0
        private void ClientSend(ISGIP_MESSAGE message)
        {
            while (true)
            {
                if (!_connect)
                {
                    Thread.Sleep(1000);
                    continue;
                }
                Thread.Sleep(_setting.SendSpan);

                try
                {
                    byte[] bytes = message.GetBytes();
                    _client.Send(bytes);
                    break;
                }
                catch
                {
                    continue;
                }
            }
        }
Exemplo n.º 2
0
 void ServerSend(SocketAsyncEventArgs send, ISGIP_MESSAGE message)
 {
     _server.Send(send, message.GetBytes());
 }