Thanks.
Now it works.
However, when I try to activate a thread :
AfxBeginThread(ServerThread,0);

I get the error :

error C3861: 'AfxBeginThread': identifier not found

even though the <windows.h> and <WinSock2.h> are included.