Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: basic tcp network module #1

Closed
wants to merge 7 commits into from

Conversation

AlexandreGerault
Copy link
Owner

Start to implement a tcp communication using Boost.Asio library.

The first iteration of the implementation should:

  • allow server to listen for new clients and accept them;
  • allow a room to communicate to its users;
  • allow client to read incoming data.

The client is represented by the tcp_connection class. The TCP server class (that accepts new connections) is represented by the tcp_server class.

The behavior that would redirect incoming data to the room will be implemented later.

@AlexandreGerault
Copy link
Owner Author

At the moment we have a basic communication behavior built on top of the TCP protocol. We send a packet on a very common way:

  1. We code the size of the packet on the 2 first Bytes.
  2. We write the packet to the rest of the buffer.
    It is now necessary to establish a protocol for the body of the content. A possible way would be like command messages such as:
  • join room {id} ;
  • chat send {message} ;
  • connect {login} {password}
    Thus we would need a class/module to dispatch these messages to commands (using the command pattern).

The last examples requires SSL to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant