Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
The send() and recv() call conversation z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Client and server communicate using send() and recv()
as shown below:
The send()
and recv() calls specify:
These functions return the amount of data that was sent or received. Because stream sockets send and receive information in streams of data, it can take more than one send() or recv() to transfer all of the data. It is up to the client and the server to agree on some mechanism to signal that all of the data has been transferred. When the conversation is over, both the client and the
server call close() to end the connection. Close() also deallocates
the socket, freeing its space in the table of connections. To end
a connection with a specific client, the server closes the socket
returned by accept(). If the server closes its original socket, it
can no longer accept new connections, but it can still converse with
the clients to which it is connected. The close() call is represented
as follows:
If you are writing a client application, you might want to verify the processes the server will use. Both client applications and the servers with which they communicate must be aware of the sequence of events each will follow. |
Copyright IBM Corporation 1990, 2014
|