0.0.39 • Published 1 year ago

mtm-ws-socket v0.0.39

Weekly downloads
75
License
LGPL-3.0
Repository
-
Last release
1 year ago

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

1 year ago

0.0.39

1 year ago

0.0.37

3 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.31

4 years ago

0.0.32

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.17

5 years ago

0.0.18

5 years ago

0.0.19

5 years ago

0.0.16

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago