Native Socket.IO and Android
Implemention Socket.IO in game maker studio
Information: https://socket.io/blog/native-socket-io-and-android/
Code server: https://github.com/socketio/socket.io/tree/master/examples/chat
Server socket test: https://socket-io-chat.now.sh/
Socket funtion:
initSocket(String host): Init socket io with host
onListener(String type): Add listener from host, type listener data in async social(GMS)
connect(): Call connect to host
disconnect(): Disconnect to host
sendJsonArray(key, json): Send data json array to host, (json as String)
sendJsonObject(key, json): Send data json object to host, (json as String)
sendString(key, value): Send string to host
sendDouble(key, value): Send double to host
offAll(): Remove all listener
offFromId(event, id): Remove listener from id;
offFromEvent(event): Remove all listener from event;
reconnection(): call reconnection(now it auto call)
onListenerOnceTime(String type): Add listener from host, type listener data in async social(GMS)(auto remove after call);
connected(): check connect to server;
Support Macros for listener: IO_CONNECT, IO_DISCONNECT, ...
NOTE: If you want to add a feature or report an error, submit a comment
Release note:
4/15/2020: Update new host from https://socketio-chat-h9jt.herokuapp.com/ in demo
4/15/2020: Fix issue implement json
End User Licence Agreement (EULA).
Fix issue implement json