Sockets not working properly

G

George

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?
 
J

Joona I Palaste

George <[email protected]> scribbled the following
Hi all. I've developed a simple client/server program using sockets for
sending some characters.

Sockets are not part of ISO standard C. Please ask in
comp.unix.programmer.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Outside of a dog, a book is a man's best friend. Inside a dog, it's too dark
to read anyway."
- Groucho Marx
 
P

Phil Frisbie, Jr.

George said:
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?

You are not providing any real details, but my guess would be either you are
closing the socket improperly on the sending end, or you are using TCP and do
not understand that it is a stream and not packets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top