public void ConnectAndListen()
 {
     if (!amsSocket.IsConnected)
     {
         amsSocket.ConnectedAsync = false;
         Connect();
         amsSocket.Listen();
     }
 }
Example #2
0
        public async Task ConnectAndListenAsync()
        {
            if (!amsSocket.IsConnected)
            {
                amsSocket.ConnectedAsync = true;
                await ConnectAsync();

                amsSocket.Listen();
            }
        }