bravoserver / bravo

UNMAINTAINED: Reverse-engineered Minecraft stuff. Worked with 1.4.x protocol
http://bravoserver.org/
Other
206 stars 45 forks source link

Multiple port/interface binding #295

Closed MostAwesomeDude closed 13 years ago

MostAwesomeDude commented 13 years ago

It should be possible to bind multiple times with a single factory. We need configuration support for this.

EntityReborn commented 13 years ago

I've added a pull request which supports ports. I haven't done anything in terms of interfaces yet tho. EDIT: I've included interfaces now. See https://github.com/MostAwesomeDude/bravo/pull/296

MostAwesomeDude commented 13 years ago

Let's take a step back. What should the configuration look like? I'm a fan of requiring endpoints. They move the burden of formatting and parsing out of Bravo, and into Twisted.

[world hurp]
interfaces = tcp:25565, tcp:25566:interface=lan

Anything else that I can think of at this point seems really hacky in comparison. Thoughts?

MostAwesomeDude commented 13 years ago

Bumping to 1.7 for configuration changes.

EntityReborn commented 13 years ago

I tried this method, but didn't have much success. the stringToServer method doesn't return a service, making things tricky. I'll look into this further.

MostAwesomeDude commented 13 years ago

You want twisted.application.strports.service(description, factory), which creates a service from an endpoint description and factory.