Public Member Functions | |
TcpServer () | |
~TcpServer () | |
bool | Listen (int32 port) |
int32 | Accept () |
TcpServer (int read_timeout) | |
~TcpServer () | |
bool | Listen (int32 port) |
int32 | Accept () |
bool | ReadChunk (size_t len) |
Vector< BaseFloat > | GetChunk () |
bool | Write (const std::string &msg) |
bool | WriteLn (const std::string &msg, const std::string &eol="\) |
void | Disconnect () |
Private Attributes | |
struct sockaddr_in | h_addr_ |
int32 | server_desc_ |
struct ::sockaddr_in | h_addr_ |
int32 | client_desc_ |
int16 * | samp_buf_ |
size_t | buf_len_ |
size_t | has_read_ |
pollfd | client_set_ [1] |
int | read_timeout_ |
Definition at line 48 of file online-audio-server-decode-faster.cc.
TcpServer | ( | ) |
Definition at line 340 of file online-audio-server-decode-faster.cc.
References TcpServer::server_desc_.
Referenced by main().
~TcpServer | ( | ) |
Definition at line 379 of file online-audio-server-decode-faster.cc.
References TcpServer::server_desc_.
Referenced by TcpServer::TcpServer().
|
explicit |
Definition at line 342 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::Accept(), TcpServer::buf_len_, TcpServer::client_desc_, TcpServer::client_set_, TcpServer::Disconnect(), TcpServer::h_addr_, KALDI_ERR, KALDI_LOG, TcpServer::Listen(), TcpServer::read_timeout_, TcpServer::samp_buf_, TcpServer::server_desc_, and TcpServer::~TcpServer().
~TcpServer | ( | ) |
int32 Accept | ( | ) |
int32 Accept | ( | ) |
Definition at line 384 of file online-audio-server-decode-faster.cc.
References TcpServer::h_addr_, and TcpServer::server_desc_.
Referenced by main(), and TcpServer::TcpServer().
void Disconnect | ( | ) |
Definition at line 484 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::client_desc_.
Referenced by TcpServer::TcpServer().
Definition at line 450 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::has_read_, rnnlm::i, Vector< Real >::Resize(), and TcpServer::samp_buf_.
Definition at line 344 of file online-audio-server-decode-faster.cc.
References TcpServer::h_addr_, KALDI_ERR, and TcpServer::server_desc_.
Referenced by main(), and TcpServer::TcpServer().
Definition at line 417 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::buf_len_, TcpServer::client_desc_, TcpServer::client_set_, TcpServer::has_read_, KALDI_WARN, TcpServer::read_timeout_, and TcpServer::samp_buf_.
bool Write | ( | const std::string & | msg | ) |
Definition at line 461 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::client_desc_.
Referenced by TcpServer::WriteLn().
bool WriteLn | ( | const std::string & | msg, |
const std::string & | eol = "\n" |
||
) |
Definition at line 478 of file online2-tcp-nnet3-decode-faster.cc.
References TcpServer::Write().
|
private |
Definition at line 65 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::ReadChunk(), and TcpServer::TcpServer().
|
private |
Definition at line 63 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::Disconnect(), TcpServer::ReadChunk(), TcpServer::TcpServer(), and TcpServer::Write().
|
private |
Definition at line 66 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::ReadChunk(), and TcpServer::TcpServer().
|
private |
Definition at line 57 of file online-audio-server-decode-faster.cc.
Referenced by TcpServer::Accept(), TcpServer::Listen(), and TcpServer::TcpServer().
|
private |
Definition at line 62 of file online2-tcp-nnet3-decode-faster.cc.
|
private |
Definition at line 65 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::GetChunk(), and TcpServer::ReadChunk().
|
private |
Definition at line 67 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::ReadChunk(), and TcpServer::TcpServer().
|
private |
Definition at line 64 of file online2-tcp-nnet3-decode-faster.cc.
Referenced by TcpServer::GetChunk(), TcpServer::ReadChunk(), and TcpServer::TcpServer().
|
private |
Definition at line 58 of file online-audio-server-decode-faster.cc.
Referenced by TcpServer::Accept(), TcpServer::Listen(), TcpServer::TcpServer(), and TcpServer::~TcpServer().