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

Documentation should be more clear about how to create a server #173

Open
keks opened this issue Dec 9, 2020 · 5 comments
Open

Documentation should be more clear about how to create a server #173

keks opened this issue Dec 9, 2020 · 5 comments

Comments

@keks
Copy link

keks commented Dec 9, 2020

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.

@Sean-Der
Copy link
Member

Sean-Der commented Dec 9, 2020

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.

@keks
Copy link
Author

keks commented Dec 10, 2020

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 😅. 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 😉

@Sean-Der
Copy link
Member

@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..

@keks
Copy link
Author

keks commented Dec 10, 2020

Sure, if that is quick to do for you, please go ahead! I undestand you'd rather maintain your own code :)

@enobufs
Copy link
Member

enobufs commented Feb 14, 2021

I hear you @keks. Current pion/sctp does not provide you with listen/connect semantics. I would like get #74 resolved some time soon.

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

No branches or pull requests

3 participants