가능 여부를 확인하려면 (그 vb.net 2.0 코드가 너무 WCF에서 작동합니다)
Dim sckTemp As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
sckTemp.ReceiveTimeout = 500 : sckTemp.SendTimeout = 500
Try
'' Connect using a timeout (1/2 second)
Dim result As IAsyncResult = sckTemp.BeginConnect("Host_ADDRESS", YOUR_SERVER_PORT_HERE, Nothing, Nothing)
Dim success As Boolean = result.AsyncWaitHandle.WaitOne(500, True)
If (Not success) Then
sckTemp.Close() : Return False
Else
Return True
End If
Catch ex As Exception
Return False
End Try
그것은 1/2 당신에게 서버 상태를 줄 것 같은 소켓 연결 를 통해 호스트에 연결을 시도 할 수 있습니다 초
위로 WCF를 할 때 나는 방금'void Ping()'을 사용했다; p –