Function sodisconnect is run before SO_LINGER option process, so the socket will be closed immediately after data is sent, which will cause another process cannot communicate with current process before the data is received. Because the two process run asynchronous, and client maybe close before server data is received.
use unix socket to communicate between two program.One program run as server, and another as client.
the sent data size of client is very small, and immediately close after calling send .
in the server process, call getpeername function after accept finished.
expect getpeername doesn't return error and error infomation is: "errorno 107 Socket is not connected".