8
I’m developing a server WebSocket
which will control multi client connections, will basically function as a chat, will be a kind of game multiplayer, after many researches and some tests I realized that when using Socket
for messages in asynchronous it is not possible to know if the message actually arrived to the client server and there is still the risk of the messages arriving in the wrong order and this serial crucial in a multiplayer game, after some research saw that the solution to this will be to implement a message queue for the socket, implementing the queue apparently is smooth theoretically would add all the messages to the end of the queue and send the messages from the first position and so respectively, but my doubt is how I’ll be sure that the first message was sent to send the second in line and so on, if I have to implement a listener for this to be a server response and I have to inform which message is the response that would influence the latency of my connection which by the way needs to be low, I’m having a hard time figuring out how to fix this.
The server application is done in C#
I am using the framework Alchemy
Client applications are javascript using WebSockets
(HTML5
)
The message queue is persisted?
– Leonel Sanches da Silva
@Gypsy omorrisonmendez is not persistent
– Tuyoshi Vinicius