liveBook · Manning

Client

As explained in Grokking Concurrency

A client process is a process that initiates a connection to a server to request or exchange data.

A client is a process that starts a conversation with a server. It connects, sends a request or message, receives any response, and eventually disconnects. A web browser talking to a web server and an email program talking to an email server follow this pattern. section 10.2

A client-server exchange usually follows these steps:

  • Connect to the server through a network socket. section 10.2 section 10.3
  • Target the server's IP address and listening port, which identify the host and application entry point. section 10.3
  • Send a message containing the requested service or data. section 10.2 section 10.3
  • Read the server's response, then close the connection when the exchange is complete. section 10.2

Ordering pizza from a local server

A pizza-ordering client connects to 127.0.0.1 on port 12345, sends a quantity such as 10, and receives “Thank you for ordering 10 pizzas!” The same exchange can be tested with Netcat on UNIX/macOS or ncat on Windows. section 10.4

Visualizes how a client connects to a server and exchanges messages through sockets. section 10.2

How Grokking Concurrency covers it

How deep it goes
Explains the connection lifecycle, socket roles, IP addresses, ports, messages, and a working terminal exchange.
Examples
Uses web browsers, email programs, Netcat, ncat, and a pizza-ordering client as concrete examples.
What you can do after
Operate/configure a client connection with Netcat or ncat using a server IP address and listening port.
How it connects
Connects clients with servers, network sockets, IP addresses, ports, messages, and connections.

Also explained in

Compare how 15 books explain client →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Concurrency. The section links point to the parts of the book it draws on.