Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++ Server / Browser Javascript Client / C++ client app


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 shocobenn   Members   -  Reputation: 273

Like
0Likes
Like

Posted 20 June 2013 - 06:34 AM

Hello !

 

I would like to create an application which allow people to interact even if they are on a browser or a c++ application. So i was wondering if choosing a library which do websocket (like Poco) is all what is neededor have I to prefer to communicate with a socket.io server with my c++ app.



Sponsor:

#2 Matt-D   Crossbones+   -  Reputation: 1410

Like
1Likes
Like

Posted 20 June 2013 - 08:40 AM

You may find these helpful: http://www.altdevblogaday.com/2012/01/23/writing-your-own-websocket-server/ http://www.altdevblogaday.com/2012/02/01/controlling-your-game-engine-over-websocket/

#3 hplus0603   Moderators   -  Reputation: 4970

Like
1Likes
Like

Posted 20 June 2013 - 06:05 PM

You can interact even with a plain HTTP request, by using polling or long polling ("comet") from the web browser. Web sockets would be able to improve the efficiency of the solution where supported, but are not necessary.

 

There are a variety of system architectures that would make sense for the use case you describe. For example, you could have a single server that listens to both HTTP requests and plain socket requests. Or you could have a gateway architecture where you have different services listening to different ports, and those services in turn talk to the game server.


enum Bool { True, False, FileNotFound };

#4 shocobenn   Members   -  Reputation: 273

Like
0Likes
Like

Posted 21 June 2013 - 05:39 AM

You can interact even with a plain HTTP request, by using polling or long polling ("comet") from the web browser. Web sockets would be able to improve the efficiency of the solution where supported, but are not necessary.

 

There are a variety of system architectures that would make sense for the use case you describe. For example, you could have a single server that listens to both HTTP requests and plain socket requests. Or you could have a gateway architecture where you have different services listening to different ports, and those services in turn talk to the game server.

 

For this solution Is it more easy to do it by making a server from scratch or use a lib (if you know free ones which are usefull for it)?



#5 hplus0603   Moderators   -  Reputation: 4970

Like
1Likes
Like

Posted 21 June 2013 - 12:11 PM

To get something up and working, I would use node.js as it already has support modules for web sockets, HTTP, and plain TCP and UDP.


enum Bool { True, False, FileNotFound };




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS