Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 866 Bytes

README.md

File metadata and controls

47 lines (40 loc) · 866 Bytes

Build Status

Ping-Pong

Basic ping-pong on sockets. Written to practice various syscalls.

Install

CMake>=3.10 and GCC are required.

git clone [email protected]:FedorChervyakov/ping-pong.git
cd ping-pong
mkdir build
cd build
cmake ../src
make

Usage

Unix sockets

./server -u some.sock
# Then, in another terminal:
./client -u some.sock

TCP sockets

-4 is used to force IPv4. Use -6 to force IPv6.

./server -4 -L '*:12345'
# Then, in another terminal:
./client -4 -C 'localhost:12345'

Requirements

Listed below are requirements for the code.

Build system

GCC and CMake

Syscalls

  • open() with various flags
  • close()
  • socket()
  • listen()
  • accept()
  • ioctl()
  • write()
  • read()