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

Add TCP socket class #1209

Closed
Tracked by #618
RiscadoA opened this issue May 29, 2024 · 0 comments · Fixed by #1258
Closed
Tracked by #618

Add TCP socket class #1209

RiscadoA opened this issue May 29, 2024 · 0 comments · Fixed by #1258
Assignees
Labels
A-Core B-Network Related to networking code

Comments

@RiscadoA
Copy link
Member

RiscadoA commented May 29, 2024

Header: core/net/tcp_socket.hpp
Source file: core/net/tcp_socket.cpp

Class name: cubos::core::net::TCPSocket

It should provide:

  • default constructor
  • forbid copy construction
  • forbid copy assignment
  • ??? connect(const Address& address, uint16_t port, int timeoutMs = 0) should return some kind of result code.
  • ??? send(const void* data, size_t size, std::size_t& sent) should return some kind of result code.
  • ??? receive(void* data, size_t size size, size_t& received) should return some kind of status code.
  • void setBlocking(bool blocking) - defaults to true. If set to false, functions return immediately (see POSIX sockets / winsocks docs)
@RiscadoA RiscadoA added A-Core B-Network Related to networking code labels May 29, 2024
@RiscadoA RiscadoA added this to the 0.3 Standalone Editor milestone May 29, 2024
@roby2014 roby2014 self-assigned this Jun 8, 2024
@roby2014 roby2014 linked a pull request Jun 9, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core B-Network Related to networking code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants