Coder Social home page Coder Social logo

mobile support about cppserver HOT 5 CLOSED

chronoxor avatar chronoxor commented on September 23, 2024
mobile support

from cppserver.

Comments (5)

chronoxor avatar chronoxor commented on September 23, 2024

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.

chronoxor avatar chronoxor commented on September 23, 2024

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.

randydom avatar randydom commented on September 23, 2024

please check your email ... thank you

from cppserver.

chronoxor avatar chronoxor commented on September 23, 2024

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.

randydom avatar randydom commented on September 23, 2024

Thank you

from cppserver.

Related Issues (20)

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.