Skip to content

Impossible to connect to server if UDP is not supported #152

@Armynator

Description

@Armynator

Quick Description

Currently connecting to a server (using the default BichannelListener) simply fails if UDP is not properly supported.
I consider this a bad design choice and very problematic, as it doesn't throw meaningful errors in all cases.

Explanation

The problem is simple:
You have a DR server using the BichannelListener and a client using the BichannelClientConnection. When the client connection over TCP is successful, it's trying to create the UDP connection. If that fails for whatever reason, either an error is thrown and the client gets disconnected, or the client gets a timeout without any meaningful error message. Especially the last case is very problematic.

My players always had the weirdest issues with UDP: connections failing completely, 100% packet loss shortly after handshake, dropped packets by routers or ISP and so on. Of course this is somewhat expected by an unreliable protocol, yet I think it's very questionable to have UDP implemented as a must-have requirement for DarkRift, as I don't see any reason for it. Also UDP seems to cause Linux-Windows-cross-platform issues, which all were suddenly fixed when I implemented a TCP-only listener on my own.

So my request is:
Make the BichannelListener and the BichannelClientConnection automatically fallback to TCP if UDP fails for whatever reason, or at least provide an official (and optional) TCP-only listener to avoid all the weird UDP issues we have had in the past once and for all. Ideally DarkRift would provide both: auto-fallback to TCP if UDP fails, and an option to disable UDP completely.

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