Re: [CODE] Socket Problems

From: Cj Stremick (stremick@IX.NETCOM.COM)
Date: 11/04/98

Pulled from MSDN...

"If no error occurs, connect returns zero. Otherwise, it returns
SOCKET_ERROR, and a specific error code can be retrieved by calling

...and SOCKET_ERROR = -1 in WinSock world just like Unix sockets.

Since you are using MSVC (and C++ features), you could also use MFC
(CAsyncSocket or CSocket) if you aren't worried about portability.  It's
pretty handy.


-----Original Message-----
From: Sammy <samedi@DHC.NET>
To: <>
Date: Wednesday, November 04, 1998 9:46 AM
Subject: Re:  [CODE] Socket Problems

>This would be a good time to learn how to use your MSVC documentation.
>Searching for "connect" will bring you to the connect API specification,
>says that your -1 means a successful connection.
>What you really ought to be looking at is the return from socket(), which
>the real failure here.  The documentation for "socket" will tell you how to
>find out why the failure occurred, and will also have a link to the API
>you need to use before socket().  That doc even provides sample code
>you exactly how to correctly set up a socket in windows.
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | |
>     +------------------------------------------------------------+

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST