#include <TcpServer.h>
◆ Session()
| TcpServer::Session::Session |
( |
SOCKET | socket | ) |
|
|
explicit |
10{
11}
SOCKET m_socket
Definition TcpServer.h:50
std::atomic< bool > m_closed
Definition TcpServer.h:52
다음을 참조함 : m_closed, m_socket.
◆ ~Session()
| TcpServer::Session::~Session |
( |
| ) |
|
14{
16}
void markClosed()
Definition TcpServer.cpp:48
다음을 참조함 : markClosed().
◆ markClosed()
| void TcpServer::Session::markClosed |
( |
| ) |
|
◆ sendInternal()
| bool TcpServer::Session::sendInternal |
( |
const std::string & | data | ) |
|
|
private |
30{
33 return false;
34
35 const char *p = data.data();
36 int left = static_cast<int>(data.size());
37 while (left > 0)
38 {
39 int n = ::send(
m_socket, p, left, 0);
40 if (n <= 0)
41 return false;
42 p += n;
43 left -= n;
44 }
45 return true;
46}
std::mutex m_sendMutex
Definition TcpServer.h:51
다음을 참조함 : m_closed, m_sendMutex, m_socket.
다음에 의해서 참조됨 : sendLine().
◆ sendLine()
| bool TcpServer::Session::sendLine |
( |
const std::string & | line | ) |
|
19{
21 return false;
22
23 std::string toSend = line;
24 if (toSend.empty() || toSend.back() != '\n')
25 toSend.push_back('\n');
27}
bool sendInternal(const std::string &data)
Definition TcpServer.cpp:29
다음을 참조함 : m_closed, sendInternal().
◆ m_closed
| std::atomic<bool> TcpServer::Session::m_closed |
|
private |
◆ m_sendMutex
| std::mutex TcpServer::Session::m_sendMutex |
|
private |
◆ m_socket
| SOCKET TcpServer::Session::m_socket |
|
private |
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: