单独提供websocket服务器程序

This commit is contained in:
xiongziliang
2019-09-17 09:48:20 +08:00
parent 4d84ae92f9
commit ee8d28dbef
5 changed files with 97 additions and 43 deletions

View File

@@ -270,13 +270,13 @@ int main(int argc,char *argv[]) {
shellSrv->start<ShellSession>(shellPort);
rtspSrv->start<RtspSession>(rtspPort);//默认554
rtmpSrv->start<RtmpSession>(rtmpPort);//默认1935
//http服务器,支持websocket
httpSrv->start<EchoWebSocketSession>(httpPort);//默认80
//http服务器
httpSrv->start<HttpSession>(httpPort);//默认80
//如果支持ssl还可以开启https服务器
TcpServer::Ptr httpsSrv(new TcpServer());
//https服务器,支持websocket
httpsSrv->start<SSLEchoWebSocketSession>(httpsPort);//默认443
httpsSrv->start<HttpsSession>(httpsPort);//默认443
//支持ssl加密的rtsp服务器可用于诸如亚马逊echo show这样的设备访问
TcpServer::Ptr rtspSSLSrv(new TcpServer());