mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 08:39:34 +08:00
完善实例代码
This commit is contained in:
parent
21acda1e42
commit
223371ab5d
@ -308,9 +308,17 @@ private:
|
||||
*/
|
||||
class EchoSession : public TcpSession {
|
||||
public:
|
||||
EchoSession(const std::shared_ptr<ThreadPool> &pTh, const Socket::Ptr &pSock) : TcpSession(pTh,pSock){};
|
||||
virtual ~EchoSession(){};
|
||||
EchoSession(const std::shared_ptr<ThreadPool> &pTh, const Socket::Ptr &pSock) :
|
||||
TcpSession(pTh,pSock){
|
||||
DebugL;
|
||||
}
|
||||
virtual ~EchoSession(){
|
||||
DebugL;
|
||||
}
|
||||
|
||||
void attachServer(const TcpServer &server) override{
|
||||
DebugL << getIdentifier() << " " << TcpSession::getIdentifier();
|
||||
}
|
||||
void onRecv(const Buffer::Ptr &buffer) override {
|
||||
send(buffer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user