I am trying to connect to an IP address on the LAN from my chipwokx board
I am using the following code:
public void ConnectToServer()
{
client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPHostEntry entry = Dns.GetHostEntry(serverIp);
IPAddress ipAddress = entry.AddressList[0];
IPEndPoint endPoint = new IPEndPoint(ipAddress, port);
client.Connect(endPoint); // Throws an exception
}
It hangs for about 2-3 minutes then thrown
exception 10035.
Am I missing something simple here?
Here is the entire error stack:
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::poll [IP: 0000] ####
#### System.Net.Sockets.Socket::Poll [IP: 0011] ####
#### System.Net.Sockets.Socket::Connect [IP: 0029] ####
#### OPI_POS.Classes.Client::ConnectToServer [IP: 0028] ####
#### OPI_POS.Program::Main [IP: 0089] ####
#### SocketException ErrorCode = 10035
#### SocketException ErrorCode = 10035
A first chance exception of type ‘System.Net.Sockets.SocketException’ occurred in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = 10035
#### SocketException ErrorCode = 10035
my firewall is off !!!