server closes client connection right away - TCP-IP

This is a discussion on server closes client connection right away - TCP-IP ; Hello, I'm writing an echo server /client application using C++, and I have this problem, the program runs fine under my linux box, its FC4, but I sent it to some guy to test it and he tells me that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: server closes client connection right away

  1. server closes client connection right away

    Hello,
    I'm writing an echo server /client application using C++, and I have
    this problem, the program runs fine under my linux box, its FC4, but I
    sent it to some guy to test it and he tells me that as soon as a
    client connects it disconnects,
    for example
    ../echosrv
    Client 0 connected from 127.0.0.1 and port 43402
    Connection closed for client 0
    Client 1 connected from xx.xx.xx.xx and port 35272
    Connection closed for client 1
    and this happens if you try to connect from a localhost or from a
    remote one,

    does anyone has any idea, why this could be happening,

    regards, Yazan


  2. Re: server closes client connection right away

    In article <1183161923.219187.288900@k29g2000hsd.googlegroups. com>,
    yazwas wrote:

    > Hello,
    > I'm writing an echo server /client application using C++, and I have
    > this problem, the program runs fine under my linux box, its FC4, but I
    > sent it to some guy to test it and he tells me that as soon as a
    > client connects it disconnects,
    > for example
    > ./echosrv
    > Client 0 connected from 127.0.0.1 and port 43402
    > Connection closed for client 0
    > Client 1 connected from xx.xx.xx.xx and port 35272
    > Connection closed for client 1
    > and this happens if you try to connect from a localhost or from a
    > remote one,
    >
    > does anyone has any idea, why this could be happening,


    You forgot to initialize the variable that you use on line 47.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

+ Reply to Thread