Re: [CODE] Socket Problems

From: Sammy (samedi@DHC.NET)
Date: 11/04/98


From: Jourge Fuzz Bush <modem-burn@GEOCITIES.COM>


>Well right now I'm trying to set up an internal e-mail system as the
>other methods recently mentioned are unreliiable. It works like the
>following:
>(This source is very messy because I am in the process of debugging)
>any it should work fine! But I get a connect error all the time. the
>host is correct. I was thinking it was possibly the port but I tried
>using it on my own mud on port 4000 it still had connect problems. Any
>ideas? O am trying to connect to port 25. and send string 1 -6.
>Eventually this will have a second argument for the subject and will
>then used advanced text editor for the body but until I get the damb
>thing to connect nothing else matters. So the connect function is
>returning -1 like it's supose to do on error. Help would be apreciated.
>Oh and I'm using win 95, msvc++ 5.0.


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, which
says that your -1 means a successful connection.

What you really ought to be looking at is the return from socket(), which is
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 call
you need to use before socket().  That doc even provides sample code showing
you exactly how to correctly set up a socket in windows.

Sam


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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