Comments (5)
This framework allows to build very performance effective TCP/UDP async C++ server in a cross-platform way for major OS (Windows, Linux, OSX) in order to have a single code base. Also it allows to connect and handle lots of clients in a thread pool to share them on CPU cores.
You can build and run CppServer for OSX and a believe it should work for iPhone as well.
For Android using Java NIO is a way to go.
There is no need to have ultra low latency TCP server on Android or iPhone. Usually you only need a client. In most cases sync client is enough.
from cppserver.
Please see TCP Chat Server example
You can handle client connect in ChatSession::onConnected() and put the client session into std::map<sessionId, session> protected with mutex. In ChatSession::onDisconnected() remove session from map. In this case you can send message to particular client by id any time you want.
from cppserver.
please check your email ... thank you
from cppserver.
See my commit - 7aaef51
Now you can use FindSession() method to send data to the required session:
auto session = server.FindSession(id);
if (session)
session->Send(buffer, size);
from cppserver.
Thank you
from cppserver.
Related Issues (20)
- WHERE IS THE BUILD FOLDER ? HOT 1
- [help][docs] Sample project please
- Unable to compile sample UDP echo server HOT 3
- build error HOT 2
- M1 Mac stuck on UDP server tests
- HttpRequests doesn't work? HOT 8
- How to contorl tcp or udp transmission rate?
- Mac build error
- module not found anymore
- not handle websocket close status code
- install using vcpkg HOT 1
- Support PIC/user-defined build options HOT 2
- Memory leak HOT 1
- build HOT 2
- How to Use UDP Broadcast in Linux?
- Build Error in CppCommon
- Request: Allow specifying OpenSSL path HOT 1
- how to get the form-data?
- SSLClient ReconnectAsync() Access Violation on Windows Debug build
- I am getting wstring_convert deprecated error. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppserver.