sctp
sctp copied to clipboard
Documentation should be more clear about how to create a server
Summary
I would like to see better documentation around how to use this package.
I would write the docs if you tell me how this works.
Motivation
It's not quite clear what kind of net.Conn
you should pass into the Server
function. Since this should be SCTP-over-UDP I expect it's the result of a net.ListenUDP
. However, that conn will receive packets from all kinds of hosts, and I haven't found a way to isolate a single connection from that.
If you tell me how it works I'll add an explanation to the readme.
Hey @keks
Server
unfortunately only does a single connection. This package is designed to do 1:1 connections only. You will need to multiplex yourself, I usually use the 5-Tuple. This could be a really great example also! I don't think we should add the de-multixplexing code to this package itself though. We might already have it in github.com/pion/transport
It would also be good to make examples/ping-pong
just a simple go run...
the complexity from the Makefile obscures this a bit.
Thanks for the quick response! Hm, I understand. Unfortunately I couldn't find anything in the transport repo.
I was hoping not having to write this myself, and would rather not commit to too much, since I need this for a recreational coding project :sweat_smile:. I'll give it a shot though. If anything comes out of this, I'd be happy to have it live in the pion code base, e.g. the transport repo. But let's not get ahead of ourselves :wink:
@keks awesome! If that is a big blocker I am sure I could code it up quickly. I would rather see you using Pion, then we get feedback/bug reports etc..
Sure, if that is quick to do for you, please go ahead! I undestand you'd rather maintain your own code :)
I hear you @keks. Current pion/sctp does not provide you with listen/connect semantics. I would like get #74 resolved some time soon.