Coder Social home page Coder Social logo

halloweeks / networking Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 125 KB

This repository contains a simple concurrent TCP server and client implemented in C++. The server is designed to handle multiple simultaneous connections using pthreads, and the client can connect to the server, send messages, and receive responses.

License: MIT License

C++ 100.00%
c multithread-server multithread-socket-server socket-programming tcp-server tcp-socket cpp-network cpp-sockets multithreaded-tcp-server tcp

networking's Introduction

Description:

This repository contains a concurrent TCP server and client implemented in C++. The server is designed to handle multiple simultaneous connections using pthreads, and the client can connect to the server, send messages, and receive responses. The server is optimized for concurrent connections, and its capacity depends on system resources such as CPU and RAM.

Installation

clone this repository :

git clone https://github.com/halloweeks/networking.git
cd networking
  1. Compile and run the server.

    g++ server.cpp -o server -pthread
    ./server
  2. The server will start and listen for incoming connections. It is optimized for concurrent connections, and its capacity depends on system resources.

Client Usage:

  1. Open a new terminal window.

  2. Compile and run the client.

    g++ client.cpp -o client
    ./client
  3. The client will connect to the server. Enter messages to send to the server.

Concurrent Capacity:

  • The server is optimized for concurrent connections.
  • The maximum number of concurrent connections depends on your system's CPU, RAM, and other resources.
  • During testing, the server successfully handled up to 200 concurrent connections.

networking's People

Contributors

halloweeks avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

notbaig

networking's Issues

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.