Giter Site home page Giter Site logo

harsh69k / closednetcomm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 191 KB

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: MIT License

C++ 96.63% Shell 3.37%
chatroom chatroom-application chatroom-client chatroom-server cpp socket-io socket-programming multithreading threding

closednetcomm's Introduction

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<iostreamS.H>
int main(){
      char ip="127.0.0.1";
      int port =6969;
      // server( ip_address, portNumber, logging ( 1 for enable/ 0 for disable)
      server(ip, port, 1);  
}

code for client

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

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

closednetcomm's People

Contributors

harsh69k avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

anoopaus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.