Re: Sockets not working properly
From: Fletcher Glenn (fletcher_at_removethisfoglight.com)
Date: 04/30/04
- Previous message: Fletcher Glenn: "Re: Striping data across mutiple disks"
- Next in thread: George: "Re: Sockets not working properly"
- Reply: George: "Re: Sockets not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 17:37:30 GMT
George wrote:
> Hi all. I've developed a simple client/server program using sockets for
> sending some characters.
>
> Well, the problem is that everything works perfectly except the last
> send/recv pair. If I print the last message received, it displays
> nothing. And what's more, the same program running in different computers
> behaves different. There're computers where that last message is printed.
>
> I've sniffed the network using ethereal and the data is transmitted in
> every case.
>
> Any idea why although the info is really transmitted, it's not received
> ok by the program?
I hope you're not sending strings, and then trying to use the
null character as a message boundary. If you are, you are
ignoring the fact that a tcp socket connection is a
stream, and there is no restriction on whether or
not a single receive may contain the contents of one
or more sends.
-- Fletcher Glenn
- Previous message: Fletcher Glenn: "Re: Striping data across mutiple disks"
- Next in thread: George: "Re: Sockets not working properly"
- Reply: George: "Re: Sockets not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|