Skip to content

snp quic#20

Open
turuslan wants to merge 52 commits into
masterfrom
snp/quic
Open

snp quic#20
turuslan wants to merge 52 commits into
masterfrom
snp/quic

Conversation

@turuslan

Copy link
Copy Markdown
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 <turuslan.devbox@gmail.com>
@turuslan turuslan requested review from iceseer and xDimon February 11, 2025 05:18
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Comment thread CMakeLists.txt
Comment thread src/TODO_qtils/macro/forward.hpp Outdated
Comment thread src/TODO_qtils/macro/make_shared.hpp Outdated
Comment thread src/TODO_qtils/macro/move.hpp Outdated
Comment thread src/TODO_qtils/macro/weak.hpp Outdated
reading_.remote_endpoint.data(),
&len);
if (n == -1) {
if (errno == EAGAIN or errno == EWOULDBLOCK) {

Copy link
Copy Markdown
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
Copy Markdown
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.

@xDimon xDimon Feb 24, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Comment thread src/snp/connections/lsquic/engine.cpp Outdated
Comment thread src/snp/connections/lsquic/engine.cpp Outdated
Comment thread src/snp/connections/lsquic/engine.cpp Outdated
Comment thread src/snp/connections/lsquic/engine.cpp Outdated
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon February 18, 2025 09:53
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Comment thread src/snp/connections/lsquic/engine.cpp Outdated
Comment thread src/snp/connections/lsquic/engine.cpp Outdated
reading_.remote_endpoint.data(),
&len);
if (n == -1) {
if (errno == EAGAIN or errno == EWOULDBLOCK) {

@xDimon xDimon Feb 24, 2025

Copy link
Copy Markdown
Member

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

Comment thread src/snp/connections/lsquic/engine.hpp Outdated
Comment thread src/snp/connections/lsquic/log.hpp
@xDimon

xDimon commented Feb 25, 2025

Copy link
Copy Markdown
Member

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

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon March 3, 2025 12:55
Comment thread src/log/simple.hpp Outdated
Comment thread src/snp/connections/lsquic/engine.hpp Outdated
Comment thread src/TODO_qtils/map_entry.hpp Outdated
Signed-off-by: turuslan <turuslan.devbox@gmail.com>

# Conflicts:
#	vcpkg-overlay/qtils/portfile.cmake
#	vcpkg-overlay/scale/portfile.cmake
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon March 31, 2025 14:58
Comment thread src/TODO_qtils/map_entry.hpp Outdated
Comment thread src/TODO_qtils/make_shared_private.hpp Outdated
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon April 23, 2025 13:25
Comment thread src/crypto/ed25519_literal.hpp
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
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.

2 participants