mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
完善代码
This commit is contained in:
parent
b1951cc3c9
commit
53a65f9592
@ -94,21 +94,21 @@ public:
|
|||||||
|
|
||||||
//收到eof或其他导致脱离TcpServer事件的回调
|
//收到eof或其他导致脱离TcpServer事件的回调
|
||||||
void onError(const SockException &err) override{
|
void onError(const SockException &err) override{
|
||||||
HttpSession::onError(err);
|
HttpSessionType::onError(err);
|
||||||
if(_session){
|
if(_session){
|
||||||
_session->onError(err);
|
_session->onError(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//每隔一段时间触发,用来做超时管理
|
//每隔一段时间触发,用来做超时管理
|
||||||
void onManager() override{
|
void onManager() override{
|
||||||
HttpSession::onManager();
|
HttpSessionType::onManager();
|
||||||
if(_session){
|
if(_session){
|
||||||
_session->onManager();
|
_session->onManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void attachServer(const TcpServer &server) override{
|
void attachServer(const TcpServer &server) override{
|
||||||
HttpSession::attachServer(server);
|
HttpSessionType::attachServer(server);
|
||||||
_weakServer = const_cast<TcpServer &>(server).shared_from_this();
|
_weakServer = const_cast<TcpServer &>(server).shared_from_this();
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
@ -272,7 +272,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef WebSocketSession<EchoSession> EchoWebSocketSession;
|
typedef WebSocketSession<EchoSession,HttpSession> EchoWebSocketSession;
|
||||||
|
typedef WebSocketSession<EchoSession,HttpsSession> SSLEchoWebSocketSession;
|
||||||
|
|
||||||
|
|
||||||
} /* namespace Http */
|
} /* namespace Http */
|
||||||
} /* namespace ZL */
|
} /* namespace ZL */
|
||||||
|
Loading…
Reference in New Issue
Block a user