Git Product home page Git Product logo

cppsocks's Introduction

cppsocks : an easy to use, dependency free, header only, ASIO-free socket library.

#C++ standard required: C++17, at minimum.

Supported OSes:

Built and tested on Windows10 and Linux Mint (based on Ubuntu 18.04).

External Dependencies:

None

Why this library?

Almost all c++ socket libraries I have found have external dependencies (annoying, can be a pain to configure), or try to do too much (example: protocols such as HTTP) are built in (so you get the cruft whether you need it or not), are not header-only, look like C++ used as 'a better C', enforce weird coding styles like multiple lambda, or add 'extra stuff' like event loops or require new paradigms like 'async programming. If you need HTTP, or 'extra stuff' for your project of course you can build that on top of this library. Cppsocks does one thing and one thing only: efficiently abstracts away the creation, connection, data sending and receiving and teardown of your system's native C sockets library.

This library is only concerned with the common tasks required to create, connect and read and write raw data. No extra cruft. If you need some protocol, you code it on top of cppsocks.

Simple, easy to understand language use

  • You do not need to be some template meta-programming genius to use cppsocks. This style is indeed (sparingly) used in the implementation of this library, but you don't need to concern yourself with it. Instead just use the exposed classes to connect/listen and then read and write raw data. If you understand classes (plus a little inheritance and virtual calls in some use-cases), then you can use this library!

All OS-specific sockets code is hidden away in the library

  • Just use cppsocks' classes by including a couple header files in your project. They work the same in Windows or Linux.
  • For Windows, the Winsock library is automatically initialised and de-initialised for you when you use this project's classes.

Good for ipv4 and ipv6 common use-cases of server, client sockets connected to a server, and remote client sockets.

cppsocks's People

Contributors

sjk7 avatar

Watchers

James Cloos avatar  avatar

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.