cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
Invalid socket
Invalid socket
Aug 15, 2012 at 5:34pm UTC
wberoli
(1)
I am writing a code to connect to a socket.
But when I use the function MySocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); it always returns invalid socket.
I donĀ“t know why this happens.
Any light would be very appreciated.
Thanks
Aug 15, 2012 at 6:12pm UTC
andywestken
(4087)
What error does WSAGetLastError() return?
The MSDN entry for the socket() function lists assorted error along with their likely causes.
Topic archived. No new replies allowed.