connection is successful sock.Close();
catch (System.Net.Sockets.SocketExceptionex) if (ex.ErrorCode == 10061) // Port is unused and could not establish connection
is successful sock.Close(); catch (System.Net.Sockets.SocketExceptionex) if (ex.ErrorCode == 10061) // Port is unused and could not establish connection
System.Threading.ThreadPool.WorkItem.doWork(Object o) InnerException: System.Net.Sockets.SocketException="No connection could be made because the target machine actively refused it"
ErrorCode=10061NativeErrorCod
TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8001. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine