Skip to content

A multi-platform, real-time chat server and client application built with C++ and socket programming, featuring logging, broadcasting, and memory management for efficient communication.

License

Notifications You must be signed in to change notification settings

HarshAnand-Git/ClosedNetComm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 

Repository files navigation

ClosedNetComm


Local Communication Exploration (Hypothetical Scenario)

Disclaimer: This scenario is for educational purposes only and does not represent recommended practices.

Imagine a hypothetical situation where two devices on a physically isolated network need to exchange data. This project could explore techniques for establishing communication within such a controlled environment, highlighting the potential security considerations and limitations.

Key Points:

  • Communication within a closed network (not connected to the internet).
  • Focus on understanding message transmission mechanisms.
  • Importance of responsible use and potential security risks.

System Requirements:

Linux or Unix (MacOs) based operating system.
(and on Windows system you might find difficult you have to import winsock2.h , ws2tcpip.h and windows.h blah blah blah...)

How to use:

Clone this repository
Open terminal

 cd ClosedNetComm/'Source File'
 ./script.sh

This script will copy the code inside to the 'Source File' to the directory where the C++ header file is present

code for server

#include <server.h>
int main(){
      char ip[]="127.0.0.1";
      int port =7777;
      // server( ip_address, portNumber, logging ( 1 for enable/ 0 for disable)
      server(ip, port, 1);  
}

code for client

#include <client.h>
int main(){
      char ip[]="127.0.0.1";
      int port =7777;
      client(ip, port);
}

CAUTION while using this code select port number above 1024 cause below 1024 are reserved by the operating system for the system services

compile your code

g++ yourFileName.cpp -o outpuFileName -std=c++20 -pthread && ./outputFileName

here's breakdown of above terminal command :
g++ :- telling terminal to compile for c++ file the <yourFileName.cpp> this the directory of the cpp file < -o yourFileName > and output it in a yourFileName file and < -std=c++20 > we're stating compiler to use c++20 (you can use 11 -upper) and -pthread to include this while compiling cause this file is multithreaded and execute ./yourFileName

About

A multi-platform, real-time chat server and client application built with C++ and socket programming, featuring logging, broadcasting, and memory management for efficient communication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published