103 Star 575 Fork 242

cpp-master/cpp-tbox

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
session.cpp 1.11 KB
Copy Edit Raw Blame History
海卫哥 authored 2023-07-25 00:13 +08:00 . tidy: 添加文件头
/*
* .============.
* // M A K E / \
* // C++ DEV / \
* // E A S Y / \/ \
* ++ ----------. \/\ .
* \\ \ \ /\ /
* \\ \ \ /
* \\ \ \ /
* -============'
*
* Copyright (c) 2018 Hevake and contributors, all rights reserved.
*
* This file is part of cpp-tbox (https://github.com/cpp-main/cpp-tbox)
* Use of this source code is governed by MIT license that can be found
* in the LICENSE file in the root of the source tree. All contributing
* project authors may be found in the CONTRIBUTORS.md file in the root
* of the source tree.
*/
#include "session.h"
#include <tbox/base/log.h>
#include "connection.h"
namespace tbox {
namespace terminal {
Session::Session(Connection *wp_conn, const SessionToken &st) :
wp_conn_(wp_conn),
st_(st)
{ }
bool Session::send(char ch) const
{
return wp_conn_->send(st_, ch);
}
bool Session::send(const std::string &str) const
{
return wp_conn_->send(st_, str);
}
bool Session::endSession() const
{
return wp_conn_->endSession(st_);
}
bool Session::isValid() const
{
return wp_conn_->isValid(st_);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cpp-master/cpp-tbox.git
git@gitee.com:cpp-master/cpp-tbox.git
cpp-master
cpp-tbox
cpp-tbox
develop

Search