Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 633 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 633 Bytes

Chat Server

Chat Server of which socket can be configured / customized in C++.

Requirements

  • Ubuntu

Working Principle

  • Select based.
  • Thread based. 2 threads will be in use:
    • 1 for listening & conn. / disconn. reqs. & receiving data
    • 1 for sending the received data to all connected clients

Build & Run

  • Build:
    • g++ main.cpp -o ChatServer server_sock.cpp -pthread
  • Run:
    • ./ChatServer

Helpful Commands

  • $ lsof -i:PORT_NUMBER can be used to see the list of PIDs which have work on PORT_NUMBER.
  • $ sudo kill -9 PID_TO_KILL can be used to kill all / previous one before starting ChatServer.