Heh well, that's good as well, but still, I wanna learn how to close it without any pre-made program.. Well, I've been studying it for a few hours now and I found something out.
I can use the function closesocket(); from Winsock2.h.. problem is, nothing is happening when I try to close CO using that function. Maybe it's blocking, so I was thinking about using WSADuplicateSocket, but I dunno if it would work out.
Compiling WS2 code needs the lib ws2_32, on gcc would be
"gcc -o bin source -lws2_32"
MSDN info working with winsock
I gotta leave for 2 weeks tomorrow so I wont be looking towards it for a while..