Skip to content

Conversation

@turuslan
Copy link
Contributor

  • ./example_chat server and ./example_chat 1, ./example_chat 2, ./example_chat 3 clients.
  • ConnectionsConfig
    • GenesisHash
    • ed25519::KeyPair
    • optional<Port> listen_port
  • Connections
    • Connections::connect(Address)
    • Connections::serve(ProtocolId, ServeProtocol)
  • ConnectionsController
    • ConnectionsController::onOpen(Key)
    • ConnectionsController::onClose(Key)
  • Connection
    • Connection::open(ProtocolId)
  • Stream
    • Stream::read(Bytes &message, MessageSize max)
    • Stream::readFin()
    • Stream::write(BytesIn message)
    • Stream::writeFin()
  • co_await
  • thread safe

Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested review from iceseer and xDimon February 11, 2025 05:18
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
reading_.remote_endpoint.data(),
&len);
if (n == -1) {
if (errno == EAGAIN or errno == EWOULDBLOCK) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other errors should be handled too (i.e. shutdown connection)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing to write one packet may fail some connection/stream.
Failing to write/read packets may fail some connection/stream by timeout.

I don't know why can reading opened udp socket fail, or what to to when it fails.

Copy link
Member

@xDimon xDimon Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. case of transport (aka network interface, eth0, wifi0, etc.) is closed/ubreacheble/off

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added error logging

Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from xDimon February 18, 2025 09:53
Signed-off-by: turuslan <[email protected]>
reading_.remote_endpoint.data(),
&len);
if (n == -1) {
if (errno == EAGAIN or errno == EWOULDBLOCK) {
Copy link
Member

@xDimon xDimon Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. case of transport (aka network interface, eth0, wifi0, etc.) is closed/ubreacheble/off

@xDimon
Copy link
Member

xDimon commented Feb 25, 2025

Would be better to cover new mechanics by tests...

Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from xDimon March 3, 2025 12:55
Signed-off-by: turuslan <[email protected]>

# Conflicts:
#	vcpkg-overlay/qtils/portfile.cmake
#	vcpkg-overlay/scale/portfile.cmake
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from xDimon March 31, 2025 14:58
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from xDimon April 23, 2025 13:25
Signed-off-by: turuslan <[email protected]>
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.

3 participants