O
O.B.
I'm attempting to set up at UDP server in unicast mode, where
10.1.16.25 is the remote machine. Below is the error being thrown
when binding the socket. What am I doing wrong?
System.Net.Sockets.SocketException
"The requested address is not valid in its context"
Socket socket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram,
ProtocolType.Udp);
socket.SetSocketOption(
SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer,
75000000); // 75 MB
socket.SetSocketOption(
SocketOptionLevel.Socket,
SocketOptionName.SendBuffer,
1472);
EndPoint receiveEndPoint = new IPEndPoint(
System.Net.IPAddress.Parse("10.1.16.25"),
socketConfig.Port);
socket.Bind(receiveEndPoint);
10.1.16.25 is the remote machine. Below is the error being thrown
when binding the socket. What am I doing wrong?
System.Net.Sockets.SocketException
"The requested address is not valid in its context"
Socket socket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram,
ProtocolType.Udp);
socket.SetSocketOption(
SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer,
75000000); // 75 MB
socket.SetSocketOption(
SocketOptionLevel.Socket,
SocketOptionName.SendBuffer,
1472);
EndPoint receiveEndPoint = new IPEndPoint(
System.Net.IPAddress.Parse("10.1.16.25"),
socketConfig.Port);
socket.Bind(receiveEndPoint);