|
-
June 5th, 2006, 01:05 PM
#1
Winsock2 connect error
I am using winsock2 to create a tcp stream. My listen function works correctly but every time i try to connect it fails. Can someone tell me why the code below always fails?
sockaddr_in target;
target.sin_family = AF_INET; // address family Internet
target.sin_port = htons (5001); // set server’s port number
target.sin_addr.s_addr = inet_addr ("127.0.0.1"); // set server’s IP
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|