Exemplo n.º 1
0
 internal SocketClientConnection(SocketClientSettings config)
 {
     configuration  = config;
     responseHelper = new ServerResponseHelper(config);
     clientSocket   = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
     ConnectToServer();
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposed)
     {
         return;
     }
     if (disposing)
     {
         if (clientSocket.Connected)
         {
             clientSocket.Close();
         }
         clientSocket.Dispose();
         clientSocket   = null;
         responseHelper = null;
     }
 }