Disconnect() 공개 메소드

public Disconnect ( ) : void
리턴 void
예제 #1
0
 public void Connect(string path)
 {
     _path = path;
     if (_client != null && _client.IsConnected)
     {
         _client.Disconnect();
     }
     _client = null;
     isConnected();
 }
예제 #2
0
파일: Program.cs 프로젝트: alex1989/OpenIDE
        private bool canConnectTo(Instance info)
        {
            var client = new SocketClient();

            client.Connect(info.Port, (s) => {});
            var connected = client.IsConnected;

            client.Disconnect();
            if (!connected)
            {
                try {
                    Process.GetProcessById(info.ProcessID);
                } catch {
                    File.Delete(info.File);
                }
            }
            return(connected);
        }
예제 #3
0
파일: Program.cs 프로젝트: acken/OpenIDE
 private bool canConnectTo(Instance info)
 {
     var client = new SocketClient();
     client.Connect(info.Port, (s) => {});
     var connected = client.IsConnected;
     client.Disconnect();
     if (!connected)
         File.Delete(info.File);
     return connected;
 }
예제 #4
0
 private bool canConnectTo(Instance info)
 {
     var client = new SocketClient();
     client.Connect(info.Port, (s) => {});
     var connected = client.IsConnected;
     client.Disconnect();
     if (!connected) {
         try {
             Process.GetProcessById(info.ProcessID);
         } catch {
             File.Delete(info.File);
         }
     }
     return connected;
 }