send(): connection reset by peer

send(): connection reset by peer

Post by MSR » Thu, 13 Mar 2003 11:41:54



Hi all,
 I am using blocking sockets. I think blockign sockets mean when I try to
send some data, send() system call will not return until it is able to send
the whole data or an error occurs. Is this correct??
Some times i get -1 from send and I try perror() it says "connection reset
by peer". What does "connection reset by peer" mean and what are all the
possible ways that error can occur? Thanks for your help.
Reddy
 
 
 

send(): connection reset by peer

Post by MSR » Thu, 13 Mar 2003 12:48:29



Quote:> Hi all,
>  I am using blocking sockets. I think blockign sockets mean when I try to
> send some data, send() system call will not return until it is able to
send
> the whole data or an error occurs. Is this correct??
> Some times i get -1 from send and I try perror() it says "connection reset
> by peer". What does "connection reset by peer" mean and what are all the
> possible ways that error can occur? Thanks for your help.
> Reddy

And also sometimes send is blocking for too long (more than a 1 min) and the
data it is trying to send is few hudred bytes. And my client on the other
end closes its connection if my server doesnt talk for 1 min. So this
probably is the reason why I am seeing the error message "Connection reset
by peer". My question is why is send blocking for so long. The client is
actually waiting to receive something from the server but server is not able
to send? I dont think it is network problem. Any help is highyly
appreciated. Thanks
Reddy

 
 
 

send(): connection reset by peer

Post by MSR » Thu, 13 Mar 2003 13:15:08





> > Hi all,
> >  I am using blocking sockets. I think blockign sockets mean when I try
to
> > send some data, send() system call will not return until it is able to
> send
> > the whole data or an error occurs. Is this correct??
> > Some times i get -1 from send and I try perror() it says "connection
reset
> > by peer". What does "connection reset by peer" mean and what are all the
> > possible ways that error can occur? Thanks for your help.
> > Reddy

> And also sometimes send is blocking for too long (more than a 1 min) and
the
> data it is trying to send is few hudred bytes. And my client on the other
> end closes its connection if my server doesnt talk for 1 min. So this
> probably is the reason why I am seeing the error message "Connection reset
> by peer". My question is why is send blocking for so long. The client is
> actually waiting to receive something from the server but server is not
able
> to send? I dont think it is network problem. Any help is highyly
> appreciated. Thanks
> Reddy

I made change so that the other end doesnt close its connection and I think
a signal is occuring. perror doesnt print any log message. Can this happen
if I give invalid data pointers/sizes to send()? Thanks

- Show quoted text -