Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
7200464e4b | |||
eaa97f0598 |
@ -38,6 +38,11 @@ let mySmartsocket = new smartsocket.Smartsocket({
|
|||||||
port: 3000 // the port smartsocket will listen on
|
port: 3000 // the port smartsocket will listen on
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// optional:
|
||||||
|
// run this with anothoer existing server like express
|
||||||
|
declare var someExpressServer // read the express docs about how express actually works
|
||||||
|
mySmartsocket.setServer(someExpressServer)
|
||||||
|
|
||||||
// A "SocketRole" can be referenced by "SocketFunction"s.
|
// A "SocketRole" can be referenced by "SocketFunction"s.
|
||||||
// All "SocketRequest"s carry authentication data for a specific "SocketRole".
|
// All "SocketRequest"s carry authentication data for a specific "SocketRole".
|
||||||
// "SocketFunction"s know which "SocketRole"s are allowed to execute them
|
// "SocketFunction"s know which "SocketRole"s are allowed to execute them
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartsocket",
|
"name": "smartsocket",
|
||||||
"version": "1.1.14",
|
"version": "1.1.15",
|
||||||
"description": "easy and secure websocket communication, TypeScript ready",
|
"description": "easy and secure websocket communication, TypeScript ready",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
@ -47,6 +47,7 @@ export class Smartsocket {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* starts the server with another server
|
* starts the server with another server
|
||||||
|
* also works with an express style server
|
||||||
*/
|
*/
|
||||||
async setServer(httpServerArg: http.Server) {
|
async setServer(httpServerArg: http.Server) {
|
||||||
this.httpServer = httpServerArg;
|
this.httpServer = httpServerArg;
|
||||||
|
Reference in New Issue
Block a user