home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!agate!apple!apple!NewsWatcher!user
- From: rol@grasp1.univ-lyon1.fr (Paul Rolland)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Re: Need help with write to a socket
- Message-ID: <rol-091192120826@90.222.1.80>
- Date: 9 Nov 92 11:06:25 GMT
- References: <40016@unix.SRI.COM>
- Sender: usenet@Apple.COM
- Followup-To: comp.protocols.tcp-ip
- Organization: Apple Computer Europe
- Lines: 34
-
- In article <40016@unix.SRI.COM>, ric@updike.sri.com (Richard Steinberger)
- wrote:
- >
- >
- > I have been porting a TCP/IP client from C to C++ on a Sun
- > running SunOS 4.1.2. The server ported fine but there is an annoying
- > bug with the client: When I write to a socket using code I lifted
-
- > In other words, it's as if the program exit process forces a flush of the
- > socket that had been taking place with each write when it was running under
- > C. This is hard for me to understand. Does anyone have any ideas? Thanks
- > in advance.
- >
- Well, this is just an idea, but are you sure the bug is not located in the
- read in the server code ? This read may be a blocking one, waiting for
- a given number of bytes, and as long as it has not received what is
- requested,
- it waits. But, when you stop the client (and then closed the connection),
- the
- server returns from the read and then you have the impression that it is
- OK..
-
- In fact, you should have give us more precisely the reference of the
- program
- you are using from the book, so that it is possible to have a look at it
- and help you a bit more. But i hope this helps !
-
- Paul Rolland, rol@grasp1.univ-lyon1.fr
- ---
-
- --------------------- DISCLAIMER -------------------
-
- All the opinions I express in this posting are mine, but I'm
- ready to share them with anybody interested :-)
-