Fortran

Guide To Learn

TCP client program: Connecting to a remote server

As I mentioned before, to implement the client, we’ll need Fortran interfaces to a few new libdill functions (figure 11.6):

  • ipaddr_remote to initialize a data structure with the remote IP address and port number
  • tcp_connect to connect to a remote socket at a given IP address
  • mrecv to 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

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top