Function of http
http.socket
Opens a WebSocket (ws or wss) and keeps it open: when the connection ends, the engine dials again. on_message gets each message on a tick.
http.socket(url: string, options: {headers: {[string]: string}?, on_message: (message: SocketMessage) -> ()}) → Socket
Parameters
urlstringoptions{headers: {[string]: string}?, on_message: (message: SocketMessage) -> ()}Returns
Socket