TCP chat server using winsocks2 and w2tcpip written in c++.
  • C++ 92.2%
  • Makefile 6.4%
  • PowerShell 1.4%
Find a file
2023-09-19 19:57:39 +05:30
.vscode remove socket name from display window 2022-11-28 16:46:15 +05:30
build updated std::logic_error what() ----> fixes nullptr string init 2023-03-17 22:40:48 +05:30
src update multi server style 2023-09-19 19:57:39 +05:30
testing Update server.cpp 2022-11-29 23:41:46 +05:30
.gitignore updated std::logic_error what() ----> fixes nullptr string init 2023-03-17 22:40:48 +05:30
auto.ps1 updated std::logic_error what() ----> fixes nullptr string init 2023-03-17 22:40:48 +05:30
LICENSE Initial commit 2022-11-15 17:44:49 +05:30
Makefile TCP server pushed to github 2022-11-15 18:03:03 +05:30
README.md Update README.md 2023-03-17 23:08:25 +05:30

TCP Server

████████╗░█████╗░██████╗░
╚══██╔══╝██╔══██╗██╔══██╗
░░░██║░░░██║░░╚═╝██████╔╝
░░░██║░░░██║░░██╗██╔═══╝░
░░░██║░░░╚█████╔╝██║░░░░░
░░░╚═╝░░░░╚════╝░╚═╝░░░░░

░██████╗███████╗██████╗░██╗░░░██╗███████╗██████╗░ ██╔════╝██╔════╝██╔══██╗██║░░░██║██╔════╝██╔══██╗ ╚█████╗░█████╗░░██████╔╝╚██╗░██╔╝█████╗░░██████╔╝ ░╚═══██╗██╔══╝░░██╔══██╗░╚████╔╝░██╔══╝░░██╔══██╗ ██████╔╝███████╗██║░░██║░░╚██╔╝░░███████╗██║░░██║ ╚═════╝░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░╚══════╝╚═╝░░╚═╝

Our project is a TCP chat server in which multiple client/users will be able to communicate with each other. The TCP server will run on localhost and will allow user to chat with one another if they are on the same network. The server code will use winsocks2 and W2tpcip header files so that the server can create and maintain sockets on Windows. The Project file also contains code for our client, through which our users can access the server. The server will act as an intermediary between the client to make a bare-bones group chat. As the server use winsocks it will only work on a Windows machine.

Directories

/src : contains all the source code for our project

/build : contains all binaries of the project

/.vscode : VS Code configuration file

/testing : contains code to be merged later and future update idea's

Files

client.cpp : code for our client

server.cpp : code for bare-bones TCP server (allows only one client)

Multi-Server.cpp : code for our TCP server (allows multiple clients)

Makefile : build instructions for g++ to include ws2_32.lib while building executables and where to place complied binaries

Use

Start server before starting the clients

To start client pass user name as argv[1] to client, when starting client Example: client0 rohan