G
Guest
Hi,
I am trying to write an application that connects to the local port with a
TCPListener and also connects to the local port using a TCPCLient
Here is the code:
Dim m_IPPort As Integer = 502
Dim m_IPAddr As String = "10.1.1.204"
Dim m_LocalIPAddr As String = ""
Dim m_CommPort As Integer = 1
Dim locIP As IPAddress
Dim ipLocalEndPoint As IPEndPoint
locIP = IPAddress.Parse(m_LocalIPAddr)
ipLocalEndPoint = New IPEndPoint(locIP, m_IPPort)
Dim m_Listener As New TcpListener(ipLocalEndPoint)
m_Listener.Start()
Dim m_tcpClient As New TcpClient
m_tcpClient.Connect(m_IPAddr, m_IPPort)
And Here is the Error:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in System.dll
Additional information: This is usually a temporary error during hostname
resolution and means that the local server did not receive a response from an
authoritative server
Please advise.
Thanks
mblake
I am trying to write an application that connects to the local port with a
TCPListener and also connects to the local port using a TCPCLient
Here is the code:
Dim m_IPPort As Integer = 502
Dim m_IPAddr As String = "10.1.1.204"
Dim m_LocalIPAddr As String = ""
Dim m_CommPort As Integer = 1
Dim locIP As IPAddress
Dim ipLocalEndPoint As IPEndPoint
locIP = IPAddress.Parse(m_LocalIPAddr)
ipLocalEndPoint = New IPEndPoint(locIP, m_IPPort)
Dim m_Listener As New TcpListener(ipLocalEndPoint)
m_Listener.Start()
Dim m_tcpClient As New TcpClient
m_tcpClient.Connect(m_IPAddr, m_IPPort)
And Here is the Error:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in System.dll
Additional information: This is usually a temporary error during hostname
resolution and means that the local server did not receive a response from an
authoritative server
Please advise.
Thanks
mblake