Skip to main content

Networking

Some dos games offers multiplayer gaming based on ipx, modem, or direct connection. Using browser isn't possible to directly connect two clients. BUT, using js-dos cloud you can emulate direct connection.

IPX#

To activate IPX support in js-dos you need to set withNetworkingApi to true:

Dos(<element>, {
withNetowkringApi: true,
}).run(<bundleUrl>);

However to connect two js-dos clients by ipx user should setup ipx server and provied server token to other clients. Looks this tutorial video that explains how to connect two browsers with ipx protocol.

Local IPX server#

You can use own server to connect two browsers by ipx (in that case you can ignore withNetworkingApi setting). To do this, please checkout js-dos ipx server and start it.

TODO: setup server

When server is started you need to connect js-dos to that server using API:

ci.networkConnect(NETWORK_DOSBOX_IPX, "ws://127.0.0.1", 1901);

If success case you will see green "Connected" bage over js-dos window.

To disconnect please use ci.networkDisconnect(NETWORK_DOSBOX_IPX).