smartsocket/dist/smartsocket.classes.socketserver.d.ts

30 lines
795 B
TypeScript
Raw Permalink Normal View History

2018-03-19 09:00:11 +00:00
import { Smartsocket } from './smartsocket.classes.smartsocket';
/**
* class socketServer
* handles the attachment of socketIo to whatever server is in play
*/
export declare class SocketServer {
private smartsocket;
private httpServer;
private standaloneServer;
private expressServer;
constructor(smartSocketInstance: Smartsocket);
/**
* starts the server with another server
* also works with an express style server
*/
setExternalServer(serverType: 'express' | 'http', serverArg: any): Promise<void>;
/**
* gets the server for socket.io
*/
getServerForSocketIo(): any;
/**
* starts listening to incoming sockets:
*/
start(): Promise<void>;
/**
* closes the server
*/
stop(): Promise<void>;
}