VOGONS


First post, by Ekarderif

User metadata
Rank Newbie
Rank
Newbie

While the IPX over UDP feature currently works well enough, I was thinking of making a permanent IPX server using one of my server boxes. As far as I know, there is no easy way of simply run DOSBox as a command-line, IPX only system with minimal overhead. I felt that creating a standalone daemon server would be ideal for this.

As a proof of concept, I managed to hack the code to create a rudimentary server. I have tested it on my local machine (Windows XP) and it seems to work properly. The actual server code is identical to the standard release but without any other feature and thus the executable is a lot smaller (14 KB under Cygwin). I was wondering if anyone else is interested? Or maybe it's already been done and I just suck at searching...

Reply 2 of 10, by Ekarderif

User metadata
Rank Newbie
Rank
Newbie

I'd like to have this sharing as much code as the base build; in case the IPX system ever gets updated, all that needs to happen is a CVS update, maybe a diff, and recompile.

Java/GUI also makes it bigger and more complex than I'd like.

Reply 3 of 10, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The CVS tunneling server has problems the way you'd like to use it: It doesn't realize wether a client disconnected. The more you connect and disconnect the more traffic it produces sending data to old clients. And it polls the socket all the time.

1+1=10

Reply 6 of 10, by Snover

User metadata
Rank l33t++
Rank
l33t++

Ekarderif, as long as the server starts automatically when run, you can use Xvfb to fake an X display so that you can run it on a headless machine. Otherwise, you can run it on another machine by forwarding X through SSH using ssh -X. Unfortunately it doesn't seem that there is any good curses library for Java that would solve everything. 🙁

Cheers,

Yes, it’s my fault.

Reply 7 of 10, by Ekarderif

User metadata
Rank Newbie
Rank
Newbie

Poking at the source, I'm wondering why the client table is a fixed array. Is there a hard cap of 16 clients or something on IPX? If not, then I'll change that to a linked list.

I'm also implementing a timeout as well as slowing down the polling of the socket.

@Snover: the problem is still that the footprint is much larger than I'd like. I'm probably using my 200 MHz computer to run this server, and so I'm looking to shrink down down the codesize as much as possible.

Reply 8 of 10, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What game will ever make use of more than 16 players... the Dosbox server was obviously not made for being a standalone one.

> slowing down the polling of the socket
gives you additional lag, would be better to block on the recv instead (so it will do work immediately when something arrives).

1+1=10

Reply 10 of 10, by Ekarderif

User metadata
Rank Newbie
Rank
Newbie

Okay, I have revamped the IPX server. It still uses the same packets as before.

Playing Doom with two copies on my local machine (with using my new server code and the default build) works good enough. I also stressed tested it overnight with connecting at random intervals (between 100ms and 10s). While the server stayed up, DOSBox failed to start Doom in multiplayer, though I could still connect and play with a different instance.

I have not tested this with separate machines.

New features:
Multithreaded server that is not reliant upon the speed of DOSBox itself
Blocked UDP listening
Timeout for connections
Binary search tree to store connections (instead of a fixed array)

http://www.rose-hulman.edu/~fengb/dosbox

Now I gotta figure out how to compartmentalize this into its own program...