Advertisement

first-time net-coder close-problem

Started by January 13, 2003 07:31 PM
0 comments, last by Metus 22 years ago
yup, just as the title sais, i''m a n00b for winsock programming. however, i''ve found it pretty simple to understand the basics of winsock 2.0. now to my problem: when one of my computers disconnects, the other will receive a message from the disconneted one, and crashes. i think that''s because i do not close() and shutdown() the connected socket before closing the application. so, when i''ve implemented the code to disconnect upon closing, the closing machine will crash on close() or shutdown(). have i missed something? (i just realized that this post went pretty confusing, but hey, it''s late here and i''ve been coding for tens of hours)
Ethereal
You must call those functions in a certain order.

shutdown()
closesocket().

One a socket is closed, you cannot shut it down because it does not exist.

Kuphryn

This topic is closed to new replies.

Advertisement