For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > June 2007 > server closes client connection right away









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author server closes client connection right away
yazwas

2007-06-29, 7:06 pm

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

Bin Chen

2007-06-29, 10:05 pm

On Jun 30, 7:52 am, yazwas <yaz...@gmail.com> 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,


It is written by TCP, right? So you can setup a capture tool such as
ethereal to see what happened.

And post your code can be more useful here.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com