Skip to content

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

Open

Description

@keks

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.

Activity

  1. Sean-Der commented on Dec 9, 2020

    @Sean-Der
    Member

    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.

  2. keks commented on Dec 10, 2020

    @keks
    Author

    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 😉

  3. Sean-Der commented on Dec 10, 2020

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

  4. keks commented on Dec 10, 2020

    @keks
    Author

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

  5. enobufs commented on Feb 14, 2021

    @enobufs
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址