All of a sudden, my PC has stopped letting me bind to sockets. It was working last night, and when I went to test a feature after a few hours of coding, nothing would bind.
Other facts:
Here's some code that is failing:
err = WSAStartup(wVersionRequested, &wsaData);
if(err == 0)
{
aSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if(aSocket != INVALID_SOCKET)
{
SOCKADDR_IN ReceiverAddr;
// The IPv4 family
ReceiverAddr.sin_family = AF_INET;
// Port no. 63939
ReceiverAddr.sin_port = htons(iPort);
// From all interface (0.0.0.0)
ReceiverAddr.sin_addr.s_addr = htonl(INADDR_ANY);
err = bind(aSocket, (SOCKADDR*)&ReceiverAddr, sizeof(ReceiverAddr));
if(err == 0)
{
I have tried:
If I run netstat
, there are no other applications using the ports I'm trying to listen on (generally TCP and UDP ports in and around the 63000 area). Doing another quick netstat
check, the highest local port currently bound is 53843.
Pretty sure the only app I installed last night was Kerbal Space Program, which I can't imagine has broken my net drivers.
Answer edit: My new theory is NetBalancer, as I just uninstalled it, would have installed it around the time I started having trouble, and have had 2 days of 10013-free development since then. Since I assume it ties its hooks fairly deep into the net stack, it makes sense too.
Will keep updating this if they come back...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With