webrtc
webrtc copied to clipboard
[sctp] multiple incoming udp connections not handled
sctp Association::server
does not track multiple connections. DisconnectedPacketConn
simply sends to the last address it received from, pretending that it's a 1:1 connection instead of 1:many, and Association
doesn't know about remote addresses at all.
Based on the pong example, it looks like each Arc<Stream>
is just an independent entity and you cannot distinguish between connections. I guess it would be possible for Arc<Stream>
to expose the SocketAddr
type or change the API in such a way to you first have to call accept_connection
before you can accept_stream
.
EDIT: So an "Association" is always one-to-one, but the way it's implemented here is that it assumes that each Association is running on an individual port. Afaik the verification_tag
is supposed to distinguish connections, but based on the source code it looks like it does not make use of the association_tag
at all, and does not even check the verification_tag
of an incoming Packet
against the expected peer_verification_tag
(?).