-
winsock2.h
Hi, i'm using msvb 6 with MFC to make a winsock application but i'm having a few problems learning the winsock2.h. This is the so far steps...i'm just learning this class.
void CDimDlg::OnButton1()
{
WSADATA info;
WSAPROTOCOL_INFO protocol_info;
WSAStartup(MAKEWORD(1,1), &info);
WSASocket(AF_INET, SOCK_STREAM, PF_INET, protocol_info, NULL, NULL);
}
i can't figure out the problem with the WSASocket functions....how do i fix this and what do i do next to start listening on the socket? do i have to do a bind()?
-
Do a search on www.planetsourcecode.com for 'Winsock'.
PS: Remember to search for C++ programs!
-
Can't you use the standard functions (socket, recv, send, select, etc.)? They're much more likely to work if you don't need all the messing-around.
Plus they're platform independent so when Windoze joins me down in hell your program will be okay ;)