0.0.39 • Published 3 months ago
mtm-ws-socket v0.0.39
MtmWsSocket
MtmWsSocket is a wrapper for the different web socket clients available
For node.js, you can use this command to install:
npm install mtm-ws-socket
import the service:
import { MtmWsSocket } from "mtm-ws-socket";
USE assuming you have injected the service using the _mtmWsSock variable name:
var ssl = true;
var ip = "127.0.0.1";
var port = 6653;
var socket = this._mtmWsSock.getClients().getNative();
if (ssl === true) {
socket.setConnection("tls", ip, port);
socket.setSslConnection(true);
} else {
socket.setConnection("tcp", ip, port);
}
//specify the function that should handle ingress messages takes a single argument
socket.setIngressCb(this, "ingressHandler");
//send a message
socket.sendMessage("hello");
0.0.38
4 months ago
0.0.39
3 months ago
0.0.37
2 years ago
0.0.36
3 years ago
0.0.35
3 years ago
0.0.34
3 years ago
0.0.33
3 years ago
0.0.31
3 years ago
0.0.32
3 years ago
0.0.30
3 years ago
0.0.29
3 years ago
0.0.28
3 years ago
0.0.27
3 years ago
0.0.26
3 years ago
0.0.25
3 years ago
0.0.24
4 years ago
0.0.23
4 years ago
0.0.22
4 years ago
0.0.21
4 years ago
0.0.20
4 years ago
0.0.17
4 years ago
0.0.18
4 years ago
0.0.19
4 years ago
0.0.16
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago