As I mentioned before, to implement the client, we’ll need Fortran interfaces to a few new libdill functions (figure 11.6):
ipaddr_remoteto initialize a data structure with the remote IP address and port numbertcp_connectto connect to a remote socket at a given IP addressmrecvto receive a message from the server on a successful connection

Figure 11.6 The Fortran TCP client program, illustrated
Having gone through the server implementation, writing these interfaces for the client should be straightforward.
TCP client program: Connecting to a remote server