Sockets not working properly

Discussion in 'C Programming' started by George, Apr 30, 2004.

  1. George

    George Guest

    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?
    --
    Saludos a todos
    #
    # Contra el terrorismo
    #
     
    George, Apr 30, 2004
    #1
    1. Advertising

  2. George <> scribbled the following
    on comp.lang.c:
    > 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 () ------------- 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
     
    Joona I Palaste, Apr 30, 2004
    #2
    1. Advertising

  3. 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?


    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.

    --
    Phil Frisbie, Jr.
    Hawk Software
    http://www.hawksoft.com
     
    Phil Frisbie, Jr., Apr 30, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aaron Powell
    Replies:
    0
    Views:
    1,218
    Aaron Powell
    Jul 24, 2003
  2. Jasper
    Replies:
    0
    Views:
    516
    Jasper
    Jun 28, 2004
  3. MSFT
    Replies:
    11
    Views:
    609
    Grimsa
    Dec 3, 2003
  4. Jeff
    Replies:
    1
    Views:
    10,494
    MrCeri
    Dec 7, 2007
  5. RSB
    Replies:
    0
    Views:
    392
Loading...

Share This Page