I have one C application that hosts server. The task for server is to send byte stream of huge data over socket to the client. Client is able to connect successfully to the server.
Now Server is able to send data to the client, but after some time server close its own socket. So my C application is not able to send data to the client over socket. When i tried to print error using perror () function I am getting error as "Connection reset by peer" and "Pipe broken". My C application is not closing socket through system call.
So My question is that, who is responsible for closing this server socket? Is there any size limit that socket can send at time? Is there any timeout?
What I have observed that this issue is weird and has no relation with size or timeout. But I am not able to understand why this server socket is getting closed.
Any help or advise? Thanks in advance.