#include <tcp_session.h>
|
typedef std::list< boost::asio::mutable_buffer > | BufferQueue |
|
Definition at line 42 of file tcp_session.h.
◆ Buffer
◆ BufferQueue
◆ Endpoint
◆ EventObserver
◆ NativeSocketType
◆ Socket
◆ Strand
◆ TcpSessionPtr
◆ Direction
◆ Event
Enumerator |
---|
EVENT_NONE | |
ACCEPT | |
CONNECT_COMPLETE | |
CONNECT_FAILED | |
CLOSE | |
Definition at line 47 of file tcp_session.h.
◆ TcpSession()
◆ ~TcpSession()
TcpSession::~TcpSession |
( |
| ) |
|
|
protectedvirtual |
◆ Accepted()
void TcpSession::Accepted |
( |
| ) |
|
|
virtual |
◆ AllocateBuffer()
mutable_buffer TcpSession::AllocateBuffer |
( |
size_t |
buffer_size | ) |
|
|
private |
◆ AsyncReadHandler()
◆ AsyncReadSome()
void TcpSession::AsyncReadSome |
( |
| ) |
|
|
protectedvirtual |
◆ AsyncReadStart()
void TcpSession::AsyncReadStart |
( |
| ) |
|
|
virtual |
◆ AsyncReadStartInternal()
◆ AsyncWrite()
void TcpSession::AsyncWrite |
( |
const uint8_t * |
data, |
|
|
std::size_t |
size |
|
) |
| |
|
protectedvirtual |
◆ AsyncWriteHandler()
void TcpSession::AsyncWriteHandler |
( |
TcpSessionPtr |
session, |
|
|
const boost::system::error_code & |
error, |
|
|
std::size_t |
bytes_transferred |
|
) |
| |
|
staticprotected |
◆ AsyncWriteInternal()
◆ BufferData()
static const uint8_t* TcpSession::BufferData |
( |
const Buffer & |
buffer | ) |
|
|
inlinestatic |
◆ BufferSize()
static size_t TcpSession::BufferSize |
( |
const Buffer & |
buffer | ) |
|
|
inlinestatic |
◆ ClearMd5SocketOption()
int TcpSession::ClearMd5SocketOption |
( |
uint32_t |
peer_ip | ) |
|
◆ Close()
void TcpSession::Close |
( |
| ) |
|
◆ close_reason()
const boost::system::error_code& TcpSession::close_reason |
( |
| ) |
const |
|
inline |
◆ CloseInternal()
void TcpSession::CloseInternal |
( |
const boost::system::error_code & |
ec, |
|
|
bool |
call_observer, |
|
|
bool |
notify_server = true |
|
) |
| |
|
protected |
◆ Connected()
bool TcpSession::Connected |
( |
Endpoint |
remote | ) |
|
|
virtual |
◆ ConnectFailed()
void TcpSession::ConnectFailed |
( |
| ) |
|
◆ CreateReaderTask()
Task * TcpSession::CreateReaderTask |
( |
boost::asio::mutable_buffer |
, |
|
|
size_t |
|
|
) |
| |
|
protectedvirtual |
◆ DeleteBuffer()
void TcpSession::DeleteBuffer |
( |
boost::asio::mutable_buffer |
buffer | ) |
|
|
private |
◆ DISALLOW_COPY_AND_ASSIGN()
TcpSession::DISALLOW_COPY_AND_ASSIGN |
( |
TcpSession |
| ) |
|
|
private |
◆ established()
bool TcpSession::established |
( |
| ) |
const |
|
inlineprotected |
◆ GetDscpValue()
uint8_t TcpSession::GetDscpValue |
( |
| ) |
const |
◆ GetReadBufferSize()
size_t TcpSession::GetReadBufferSize |
( |
| ) |
const |
|
protectedvirtual |
◆ GetRxSocketStats() [1/2]
void TcpSession::GetRxSocketStats |
( |
SocketIOStats & |
socket_stats | ) |
const |
|
inline |
◆ GetRxSocketStats() [2/2]
void TcpSession::GetRxSocketStats |
( |
SocketIOStats * |
socket_stats | ) |
const |
◆ GetSessionInstance()
int TcpSession::GetSessionInstance |
( |
| ) |
const |
|
virtual |
◆ GetSocketStats()
◆ GetTxSocketStats() [1/2]
void TcpSession::GetTxSocketStats |
( |
SocketIOStats & |
socket_stats | ) |
const |
|
inline |
◆ GetTxSocketStats() [2/2]
void TcpSession::GetTxSocketStats |
( |
SocketIOStats * |
socket_stats | ) |
const |
◆ IsClosed()
bool TcpSession::IsClosed |
( |
| ) |
const |
|
inline |
◆ IsClosedLocked()
bool TcpSession::IsClosedLocked |
( |
| ) |
const |
|
inlineprivate |
◆ IsEstablished()
bool TcpSession::IsEstablished |
( |
| ) |
const |
|
inline |
◆ IsEstablishedLocked()
bool TcpSession::IsEstablishedLocked |
( |
| ) |
const |
|
inlineprivate |
◆ IsReaderDeferred()
virtual bool TcpSession::IsReaderDeferred |
( |
| ) |
const |
|
inlinevirtual |
◆ IsServerSession()
bool TcpSession::IsServerSession |
( |
| ) |
|
|
inline |
◆ IsSocketErrorHard()
bool TcpSession::IsSocketErrorHard |
( |
const boost::system::error_code & |
ec | ) |
|
|
static |
◆ local_endpoint()
◆ local_port()
int32_t TcpSession::local_port |
( |
| ) |
const |
◆ observer()
◆ OnRead()
virtual void TcpSession::OnRead |
( |
Buffer |
buffer | ) |
|
|
protectedpure virtual |
◆ reader_task_id()
virtual int TcpSession::reader_task_id |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ ReadSome()
size_t TcpSession::ReadSome |
( |
boost::asio::mutable_buffer |
buffer, |
|
|
boost::system::error_code * |
error |
|
) |
| |
|
protectedvirtual |
◆ ReleaseBuffer()
void TcpSession::ReleaseBuffer |
( |
Buffer |
buffer | ) |
|
|
virtual |
◆ ReleaseBufferLocked()
void TcpSession::ReleaseBufferLocked |
( |
Buffer |
buffer | ) |
|
|
private |
◆ remote_addr_string()
const std::string& TcpSession::remote_addr_string |
( |
| ) |
const |
|
inline |
◆ remote_endpoint()
Endpoint TcpSession::remote_endpoint |
( |
| ) |
const |
|
inline |
◆ remote_port()
int32_t TcpSession::remote_port |
( |
| ) |
const |
◆ Send()
bool TcpSession::Send |
( |
const uint8_t * |
data, |
|
|
size_t |
size, |
|
|
size_t * |
sent |
|
) |
| |
|
virtual |
◆ server()
◆ SessionEstablished()
◆ set_observer()
◆ set_read_on_connect()
void TcpSession::set_read_on_connect |
( |
bool |
read | ) |
|
|
inline |
◆ SetDeferReader()
void TcpSession::SetDeferReader |
( |
bool |
defer_reader | ) |
|
|
virtual |
◆ SetDscpSocketOption()
int TcpSession::SetDscpSocketOption |
( |
uint8_t |
value | ) |
|
◆ SetEstablished()
◆ SetMd5SocketOption()
int TcpSession::SetMd5SocketOption |
( |
uint32_t |
peer_ip, |
|
|
const std::string & |
md5_password |
|
) |
| |
◆ SetName()
void TcpSession::SetName |
( |
| ) |
|
|
private |
◆ SetSocketKeepaliveOptions()
error_code TcpSession::SetSocketKeepaliveOptions |
( |
int |
keepalive_time, |
|
|
int |
keepalive_intvl, |
|
|
int |
keepalive_probes, |
|
|
int |
tcp_user_timeout_val = 0 |
|
) |
| |
|
protected |
◆ SetSocketOptions()
error_code TcpSession::SetSocketOptions |
( |
| ) |
|
|
virtual |
◆ SetTcpNoDelay()
error_code TcpSession::SetTcpNoDelay |
( |
| ) |
|
◆ SetTcpRecvBufSize()
error_code TcpSession::SetTcpRecvBufSize |
( |
uint32_t |
size | ) |
|
◆ SetTcpSendBufSize()
error_code TcpSession::SetTcpSendBufSize |
( |
uint32_t |
size | ) |
|
◆ sock_descriptor()
◆ socket()
virtual Socket* TcpSession::socket |
( |
| ) |
const |
|
inlinevirtual |
◆ ToString()
virtual std::string TcpSession::ToString |
( |
| ) |
const |
|
inlinevirtual |
◆ ToUVEKey()
const std::string& TcpSession::ToUVEKey |
( |
| ) |
const |
|
inline |
◆ TriggerAsyncReadHandler()
void TcpSession::TriggerAsyncReadHandler |
( |
| ) |
|
|
protected |
◆ WriteReady()
void TcpSession::WriteReady |
( |
const boost::system::error_code & |
error | ) |
|
|
protectedvirtual |
◆ WriteReadyInternal()
static void TcpSession::WriteReadyInternal |
( |
TcpSessionPtr |
session, |
|
|
const boost::system::error_code & |
error, |
|
|
uint64_t |
block_start_time |
|
) |
| |
|
staticprivate |
◆ intrusive_ptr_add_ref
void intrusive_ptr_add_ref |
( |
TcpSession * |
session | ) |
|
|
friend |
◆ intrusive_ptr_release
void intrusive_ptr_release |
( |
TcpSession * |
session | ) |
|
|
friend |
◆ TcpMessageWriter
◆ TcpServer
◆ buffer_queue_
◆ close_reason_
boost::system::error_code TcpSession::close_reason_ |
|
private |
◆ closed_
◆ defer_reader_
tbb::atomic<bool> TcpSession::defer_reader_ |
|
private |
◆ direction_
◆ established_
bool TcpSession::established_ |
|
private |
◆ io_strand_
boost::scoped_ptr<Strand> TcpSession::io_strand_ |
|
protected |
◆ kDefaultBufferSize
const int TcpSession::kDefaultBufferSize = 16 * 1024 |
|
static |
◆ kDefaultWriteBufferSize
const int TcpSession::kDefaultWriteBufferSize = 32 * 1024 |
|
static |
◆ mutex_
tbb::mutex TcpSession::mutex_ |
|
mutableprotected |
◆ name_
std::string TcpSession::name_ |
|
private |
◆ obs_mutex_
tbb::mutex TcpSession::obs_mutex_ |
|
private |
◆ observer_
◆ read_on_connect_
bool TcpSession::read_on_connect_ |
|
private |
◆ reader_task_id_
int TcpSession::reader_task_id_ = -1 |
|
staticprivate |
◆ refcount_
tbb::atomic<int> TcpSession::refcount_ |
|
private |
◆ remote_
◆ remote_addr_str_
std::string TcpSession::remote_addr_str_ |
|
private |
◆ server_
◆ socket_
boost::scoped_ptr<Socket> TcpSession::socket_ |
|
private |
◆ stats_
◆ tcp_close_in_progress_
tbb::atomic<bool> TcpSession::tcp_close_in_progress_ |
|
private |
◆ uve_key_str_
std::string TcpSession::uve_key_str_ |
|
private |
◆ write_blocked_
tbb::atomic<bool> TcpSession::write_blocked_ |
|
private |
◆ writer_
The documentation for this class was generated from the following files: