Article View: demon.ip.developers
Article #1368Re: Sockets problem - anyone come across this
From: Ewan Kirk
Date: Thu, 23 Nov 1995 00:00
Date: Thu, 23 Nov 1995 00:00
25 lines
2028 bytes
2028 bytes
In Article <15034265wnr@thermoteknix.co.uk> David Wood writes: >Hello one and all Hi, [snip] I think you might find it's a problem in your coding. And especially in the coding of your tcp/ip class. I have a class library that does much the same thing. There's a socket class and which contains and embedded window. The window has an extra window long which stores the this pointer. When you get an fd* message you pick up the window long, cast it into a socket pointer and then call the virtual Read or Write call or something. You have to be super careful not to call the socket destructor during any of these calls because clearly that's going to screw you up because you've got to unwind back the stack through the windows procedure. It's really really easy to make mistakes with this when you have lots of derived classes and virtual function calls. For what it's worth, I call closesocket in response to fd reads or fd accepts all the time and the system doesn't hang. --E.
Technical Details
Message-ID:
<jzqrjwae@kirk.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<15034265wnr@thermoteknix.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c888,9c3cf10da91f1089 X-Google-Attributes: gid10c888,public X-Google-Thread: 10ff62,9c3cf10da91f1089 X-Google-Attributes: gid10ff62,public X-Google-Thread: 10bb05,9c3cf10da91f1089 X-Google-Attributes: gid10bb05,public X-Google-Thread: 10a29b,9c3cf10da91f1089 X-Google-Attributes: gid10a29b,public X-Google-Thread: fa91f,9c3cf10da91f1089 X-Google-Attributes: gidfa91f,public From: Ewan Kirk <ewan@kirk.demon.co.uk> Subject: Re: Sockets problem - anyone come across this Date: 1995/11/23 Message-ID: <jzqrjwae@kirk.demon.co.uk> X-Deja-AN: 120009116 x-nntp-posting-host: kirk.demon.co.uk references: <15034265wnr@thermoteknix.co.uk> x-smtp-posting-host: post.demon.co.uk [Fri, 24 Nov 95 7:09:13 GMT] organization: His Computer reply-to: Ewan Kirk <ewan@kirk.demon.co.uk> newsgroups: demon.ip.developers,comp.os.ms-windows.networking.tcp-ip,comp.os.ms-windows.programmer.networks,comp.protocols.tcp-ip.ibmpc,demon.ip.support.win95