예제 #1
0
파일: SGIP12.cs 프로젝트: aspdotnetmvc/mvc
        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;
                }
            }
        }
예제 #2
0
파일: SGIP12.cs 프로젝트: aspdotnetmvc/mvc
 void ServerSend(SocketAsyncEventArgs send, ISGIP_MESSAGE message)
 {
     _server.Send(send, message.GetBytes());
 }