J
Joshua Moore
Here's the C# code:
----
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
socket.Blocking = true;
EndPoint sender = new IPEndPoint(IPAddress.Any, 2222);
socket.Bind(sender);
----
I need to stop reading in packets and stop the packets from being read into the queue, but then be able to reconnect the socket.
Currently, I use:
----
public void UnBind()
socket - null;
public void ReBind()
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
socket.Blocking = true;
EndPoint sender = new IPEndPoint(IPAddress.Any, 2068);
socket.Bind(sender);
-----
When I call "ReBind", it gives the error "Only one usage of each socket address(protocol/network address/port) is normally permitted".
Any help would be greatly appreciated.
Joshua Moore
----
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
socket.Blocking = true;
EndPoint sender = new IPEndPoint(IPAddress.Any, 2222);
socket.Bind(sender);
----
I need to stop reading in packets and stop the packets from being read into the queue, but then be able to reconnect the socket.
Currently, I use:
----
public void UnBind()
socket - null;
public void ReBind()
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
socket.Blocking = true;
EndPoint sender = new IPEndPoint(IPAddress.Any, 2068);
socket.Bind(sender);
-----
When I call "ReBind", it gives the error "Only one usage of each socket address(protocol/network address/port) is normally permitted".
Any help would be greatly appreciated.
Joshua Moore