ignoxx / SocketIO-GMS2-Extension

Socket.io extension for GameMaker: Studio 2 (HTML5)
https://ignoxx.dev/socketio
MIT License
44 stars 16 forks source link

Simplified the connection code #5

Closed Nichii closed 5 years ago

Nichii commented 5 years ago

Client socket.io connection can be made to the server just by calling the 'io();' function. Source: https://socket.io/docs/client-api/

Stated in url parameter for 'io([url][, options]);' function:

The above replaces the 'io.connect(http://${ip}:${port})' which makes it impossible to connect to the server if your URL doesn't follow the same template.

In addition to that, I have added the ability to connect by a specific URL (if your server is hosted elsewhere) with a new function called sio_connect_by_url(url: string) and removed the lowercase event name restriction.

This may cause minor rewrites required from the Wiki, examples and GMS/GMS2's extension.

Nichii commented 5 years ago

Thanks for merging it. Can we have an updated release on GitHub soon?

Also, there are still some minor corrections in the Wiki:

ignoxx commented 5 years ago

Release for GMS 2 is up. GMS 1.x will follow soon.

Updated wiki, thanks.