我正在尝试查看计算机 localhost 上的端口 57875 是否已关闭。这是我到目前为止的代码:
Try
Dim checkPort As TcpClient = New TcpClient("localhost", 57875)
Catch ex As Exception
MsgBox("WARNING: Port 57875 is not forwarded ! The game will probably encounter an error !")
End Try
即使它被转发,它也会认为它不是。代码有什么问题?