This repo contains code examples to understand the book TCP/IP illustrated volume 2. Some examples are named using chapter names from the book. Others are standalone examples made to understand a particular function from the system's socket API.
Swift is used to call c functions.
Use socket API to get the current timestamp from a NTP server.
An example to demonstrate the use of getaddrinfo function.
An server-client TCP connection example.
CFSocket is a wrapper on BSD socket APIs. This example shows a simple client-server connection-oriented implementation.