Home > other >  The send and recv function in a TCP connection
The send and recv function in a TCP connection

Time:09-23

For TCP connections, send with the first parameter to the recv function for the socket information, but the two function called on the server side, the first parameter is the client socket, and the client calls the two function is used in the client socket, is not symmetrical, the great god give a reasonable explanation

CodePudding user response:

Adversary, the server socket is to accept the returned, on behalf of the client socket

CodePudding user response:

The server socket send function, not clear answer

CodePudding user response:

Also pay attention to the judgment, the return value, that is, the length of the actual writing success or to be successful, avoid sending (receive) incomplete, originally a few pit
  • Related