|
-
Oct 14th, 2002, 06:08 PM
#1
Thread Starter
Addicted Member
Problem With FD_CLOSE Event
is the FD_CLOSE msg sent only when a socket is closed remote or when you close the socket also? I am using the closesocket() function to close my socket and when I do it doesnt send the FD_CLOSE msg. And I dont think it is when the connection is closed remotely.
-
Oct 15th, 2002, 10:09 AM
#2
Frenzied Member
Try shutdown(sckSocket,0x02);
Also you might try catching the socket close event and force send a FD_CLOSE over the wire.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 15th, 2002, 03:03 PM
#3
Thread Starter
Addicted Member
what do u mean catch the close event?
and what does shutdown() do? close the socket?
-
Oct 15th, 2002, 03:08 PM
#4
Frenzied Member
Are you using MFC? or API?
Did you use WSAAsyncSelect to setup a callback?
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 15th, 2002, 03:28 PM
#5
Thread Starter
Addicted Member
Im using API, and I did use WSAAsyncSelect. I think I fixed the problem with the FD_CLOSE message, but now I cant seem to have the socket reconnect.
-
Oct 15th, 2002, 03:53 PM
#6
Frenzied Member
That might be casused by the socket on the "server" or "client" end still holding your port open. You need to make sure that the socket is clear/destroyed before reconnecting
It would be more helpfull if I could see your code or project.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Oct 15th, 2002, 04:29 PM
#7
Thread Starter
Addicted Member
thx. Actually I just fixed it.
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
|