-1

I am trying to send 212 KByte of Buffer over a tcp socket connection but in response i am receiving RST packet and connection reset by peer error.

I have changed SO_RCVBUF and SO_SBNBUF properties to 256 KB, and have verified that max_buf system property is also > 256 K. Still when i try to send large data the connection fails.

I am new to socket programming so please let me know if some more info is required. I think i am missing some socket options.

Os: solaris sparc

Yogesh
  • 565
  • 3
  • 21

1 Answers1

1

This error usually means you have written to a connection that has already been closed by the other end. There are other causes, but this is the most common. Is the recipient really supposed to deal with the sizes you are sending?

user207421
  • 305,947
  • 44
  • 307
  • 483
  • .Yes recipient and sender both have same SENDING and RECEIVING buffer size ..I have snoop capture of both client and server machines, and i can see that segments of 1500 bytes size are being sent from client, and at the same time they are received by the server. But mean while because of some problem server is sending RST messge to the client which is resetting the connection. – Yogesh Aug 07 '12 at 10:15
  • 1
    @Yogesh I didn't ask about the send or receive buffer sizes. How about you answer the question I asked? Obviously the whole issue centres around 'because of some problem'. Have you looked at the server logs? – user207421 Aug 07 '12 at 10:36
  • Thanks a lot for the pointer.. deep inside there was a check on server side to disconnect the channel when the buffer size was > 64 KB. Now it is working fine. – Yogesh Aug 07 '12 at 13:20