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

snp quic #20

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open

snp quic #20

wants to merge 41 commits into from

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 xDimon and iceseer 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]>
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 my 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
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