mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
适配ZLToolKit develop分支
This commit is contained in:
@@ -38,14 +38,14 @@ namespace Shell {
|
||||
|
||||
ShellSession::ShellSession(const std::shared_ptr<ThreadPool> &_th,
|
||||
const Socket::Ptr &_sock) :
|
||||
TcpLimitedSession(_th, _sock) {
|
||||
TcpSession(_th, _sock) {
|
||||
pleaseInputUser();
|
||||
}
|
||||
|
||||
ShellSession::~ShellSession() {
|
||||
}
|
||||
|
||||
void ShellSession::onRecv(const Socket::Buffer::Ptr&buf) {
|
||||
void ShellSession::onRecv(const Buffer::Ptr&buf) {
|
||||
//DebugL << hexdump(buf->data(), buf->size());
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,maxReqSize,Config::Shell::kMaxReqSize);
|
||||
if (m_strRecvBuf.size() + buf->size() >= maxReqSize) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <functional>
|
||||
#include "Common/config.h"
|
||||
#include "Util/TimeTicker.h"
|
||||
#include "Network/TcpLimitedSession.h"
|
||||
#include "Network/TcpSession.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ZL::Util;
|
||||
@@ -39,12 +39,12 @@ using namespace ZL::Network;
|
||||
namespace ZL {
|
||||
namespace Shell {
|
||||
|
||||
class ShellSession: public TcpLimitedSession<MAX_TCP_SESSION> {
|
||||
class ShellSession: public TcpSession {
|
||||
public:
|
||||
ShellSession(const std::shared_ptr<ThreadPool> &_th, const Socket::Ptr &_sock);
|
||||
virtual ~ShellSession();
|
||||
|
||||
void onRecv(const Socket::Buffer::Ptr &) override;
|
||||
void onRecv(const Buffer::Ptr &) override;
|
||||
void onError(const SockException &err) override {};
|
||||
void onManager() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user