w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <Rw11VirtTermTcp.hpp>
Public Types | |
enum | stats { kStatNVTPreConSave = Rw11VirtTerm::kDimStat , kStatNVTPreConDrop , kStatNVTListenPoll , kStatNVTAccept , kStatNVTRcvRaw , kStatNVTSndRaw , kDimStat } |
Public Types inherited from Retro::Rw11VirtTerm | |
enum | stats { kStatNVTRcvPoll = Rw11Virt::kDimStat , kStatNVTSnd , kStatNVTRcvByt , kStatNVTSndByt , kDimStat } |
typedef std::function< bool(const uint8_t *, size_t)> | rcvcbfo_t |
Public Types inherited from Retro::Rw11Virt | |
enum | stats { kDimStat = 0 } |
Public Member Functions | |
Rw11VirtTermTcp (Rw11Unit *punit) | |
Default constructor. | |
~Rw11VirtTermTcp () | |
Destructor. | |
virtual bool | Open (const std::string &url, RerrMsg &emsg) |
FIXME_docs. | |
virtual bool | Snd (const uint8_t *data, size_t count, RerrMsg &emsg) |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11VirtTerm | |
Rw11VirtTerm (Rw11Unit *punit) | |
Default constructor. | |
~Rw11VirtTerm () | |
Destructor. | |
virtual const std::string & | ChannelId () const |
FIXME_docs. | |
void | SetupRcvCallback (rcvcbfo_t &&rcvcbfo) |
FIXME_docs. | |
virtual bool | Snd (const uint8_t *data, size_t count, RerrMsg &emsg)=0 |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Public Member Functions inherited from Retro::Rw11Virt | |
Rw11Virt (Rw11Unit *punit) | |
Default constructor. | |
virtual | ~Rw11Virt () |
Destructor. | |
Rw11Virt (const Rw11Virt &)=delete | |
Rw11Virt & | operator= (const Rw11Virt &)=delete |
Rw11Unit & | Unit () const |
FIXME_docs. | |
Rw11Cntl & | Cntl () const |
FIXME_docs. | |
Rw11Cpu & | Cpu () const |
FIXME_docs. | |
Rw11 & | W11 () const |
FIXME_docs. | |
RlinkServer & | Server () const |
FIXME_docs. | |
RlogFile & | LogFile () const |
FIXME_docs. | |
virtual bool | WProt () const |
FIXME_docs. | |
const RparseUrl & | Url () const |
FIXME_docs. | |
virtual bool | Open (const std::string &url, RerrMsg &emsg)=0 |
Rstats & | Stats () |
FIXME_docs. | |
virtual void | Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const |
FIXME_docs. | |
Protected Types | |
enum | telnet_state { ts_Closed = 0 , ts_Listen , ts_Stream , ts_Iac , ts_Cmd , ts_Subneg , ts_Subiac } |
Protected Member Functions | |
bool | Connected () const |
FIXME_docs. | |
int | ListenPollHandler (const pollfd &pfd) |
FIXME_docs. | |
int | RcvPollHandler (const pollfd &pfd) |
FIXME_docs. | |
Protected Attributes | |
int | fFdListen |
int | fFd |
telnet_state | fState |
bool | fTcpTrace |
std::deque< uint8_t > | fSndPreConQue |
Protected Attributes inherited from Retro::Rw11VirtTerm | |
std::string | fChannelId |
channel id | |
rcvcbfo_t | fRcvCb |
receive callback fobj | |
Protected Attributes inherited from Retro::Rw11Virt | |
Rw11Unit * | fpUnit |
back ref to unit | |
RparseUrl | fUrl |
bool | fWProt |
write protected | |
Rstats | fStats |
statistics | |
Static Protected Attributes | |
static const uint8_t | kCode_NULL = 0 |
static const uint8_t | kCode_LF = 10 |
static const uint8_t | kCode_CR = 13 |
static const uint8_t | kCode_ESC = 27 |
static const uint8_t | kCode_SE = 240 |
static const uint8_t | kCode_NOP = 241 |
static const uint8_t | kCode_IP = 244 |
static const uint8_t | kCode_GA = 249 |
static const uint8_t | kCode_SB = 250 |
static const uint8_t | kCode_WILL = 251 |
static const uint8_t | kCode_WONT = 252 |
static const uint8_t | kCode_DO = 253 |
static const uint8_t | kCode_DONT = 254 |
static const uint8_t | kCode_IAC = 255 |
static const uint8_t | kOpt_BIN = 0 |
static const uint8_t | kOpt_ECHO = 1 |
static const uint8_t | kOpt_SGA = 3 |
static const uint8_t | kOpt_TTYP = 24 |
static const uint8_t | kOpt_LINE = 34 |
static const size_t | kPreConQue_limit = 65536 |
Additional Inherited Members | |
Static Public Member Functions inherited from Retro::Rw11VirtTerm | |
static std::unique_ptr< Rw11VirtTerm > | New (const std::string &url, Rw11Unit *punit, RerrMsg &emsg) |
FIXME_docs. | |
FIXME_docs.
Implemenation (inline) of Rw11VirtTermTcp.
FIXME_docs
Definition at line 27 of file Rw11VirtTermTcp.hpp.
Enumerator | |
---|---|
kStatNVTPreConSave | |
kStatNVTPreConDrop | |
kStatNVTListenPoll | |
kStatNVTAccept | |
kStatNVTRcvRaw | |
kStatNVTSndRaw | |
kDimStat |
Definition at line 41 of file Rw11VirtTermTcp.hpp.
|
protected |
Enumerator | |
---|---|
ts_Closed | |
ts_Listen | |
ts_Stream | |
ts_Iac | |
ts_Cmd | |
ts_Subneg | |
ts_Subiac |
Definition at line 81 of file Rw11VirtTermTcp.hpp.
|
explicit |
Default constructor.
Definition at line 84 of file Rw11VirtTermTcp.cpp.
References Retro::Rstats::Define(), Retro::Rw11Virt::fStats, kStatNVTAccept, kStatNVTListenPoll, kStatNVTPreConDrop, kStatNVTPreConSave, kStatNVTRcvRaw, and kStatNVTSndRaw.
Retro::Rw11VirtTermTcp::~Rw11VirtTermTcp | ( | ) |
Destructor.
Definition at line 106 of file Rw11VirtTermTcp.cpp.
References Retro::Rtools::Catch2Cerr(), Connected(), fFd, fFdListen, Retro::RlinkServer::RemovePollHandler(), and Retro::Rw11Virt::Server().
|
virtual |
FIXME_docs.
Implements Retro::Rw11Virt.
Definition at line 123 of file Rw11VirtTermTcp.cpp.
References Retro::RlinkServer::AddPollHandler(), Retro::Rw11VirtTerm::fChannelId, fFdListen, Retro::RparseUrl::FindOpt(), fState, fTcpTrace, Retro::Rw11Virt::fUrl, Retro::RerrMsg::Init(), Retro::RerrMsg::InitErrno(), ListenPollHandler(), Retro::Rw11Virt::LogFile(), Retro::Rw11Unit::Name(), Retro::Rw11Virt::Server(), Retro::RparseUrl::Set(), Retro::Rtools::String2Long(), ts_Listen, and Retro::Rw11Virt::Unit().
|
virtual |
FIXME_docs.
Implements Retro::Rw11VirtTerm.
Definition at line 193 of file Rw11VirtTermTcp.cpp.
References Connected(), Retro::Rw11VirtTerm::fChannelId, fFd, fSndPreConQue, Retro::Rw11Virt::fStats, Retro::Rstats::Inc(), kCode_IAC, kPreConQue_limit, kStatNVTPreConDrop, kStatNVTPreConSave, Retro::Rw11VirtTerm::kStatNVTSnd, Retro::Rw11VirtTerm::kStatNVTSndByt, kStatNVTSndRaw, and Retro::Rw11Virt::LogFile().
|
virtual |
FIXME_docs.
Reimplemented from Retro::Rw11VirtTerm.
Definition at line 239 of file Rw11VirtTermTcp.cpp.
References Retro::Rw11VirtTerm::Dump(), fFd, fFdListen, fSndPreConQue, fState, fTcpTrace, Retro::RosPrintf(), ts_Closed, ts_Cmd, ts_Iac, ts_Listen, ts_Stream, ts_Subiac, and ts_Subneg.
|
inlineprotected |
FIXME_docs.
Definition at line 27 of file Rw11VirtTermTcp.ipp.
References fFd.
Referenced by Snd(), and ~Rw11VirtTermTcp().
|
protected |
FIXME_docs.
Definition at line 268 of file Rw11VirtTermTcp.cpp.
References Retro::RlinkServer::AddPollHandler(), Retro::Rw11VirtTerm::fChannelId, fFd, fFdListen, fSndPreConQue, fState, Retro::Rw11Virt::fStats, fTcpTrace, Retro::Rstats::Inc(), kCode_DO, kCode_IAC, kCode_WILL, kOpt_BIN, kOpt_ECHO, kOpt_LINE, kOpt_SGA, kStatNVTAccept, Retro::Rw11Virt::LogFile(), Retro::Rw11Unit::Name(), RcvPollHandler(), Retro::RlinkServer::RemovePollHandler(), Retro::Rw11Virt::Server(), ts_Stream, and Retro::Rw11Virt::Unit().
Referenced by Open(), and RcvPollHandler().
|
protected |
FIXME_docs.
Definition at line 349 of file Rw11VirtTermTcp.cpp.
References Retro::RlinkServer::AddPollHandler(), Retro::Rw11VirtTerm::fChannelId, fFd, fFdListen, Retro::Rw11VirtTerm::fRcvCb, fState, Retro::Rw11Virt::fStats, fTcpTrace, Retro::Rstats::Inc(), kCode_DO, kCode_DONT, kCode_IAC, kCode_SB, kCode_WILL, kCode_WONT, Retro::Rw11VirtTerm::kStatNVTRcvByt, Retro::Rw11VirtTerm::kStatNVTRcvPoll, kStatNVTRcvRaw, ListenPollHandler(), Retro::Rw11Virt::LogFile(), Retro::Rw11Unit::Name(), Retro::Rw11Virt::Server(), ts_Cmd, ts_Iac, ts_Listen, ts_Stream, ts_Subiac, ts_Subneg, and Retro::Rw11Virt::Unit().
Referenced by ListenPollHandler().
|
staticprotected |
Definition at line 58 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 59 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 60 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 61 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 62 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 63 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 64 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 65 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 66 of file Rw11VirtTermTcp.hpp.
Referenced by RcvPollHandler().
|
staticprotected |
Definition at line 67 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler(), and RcvPollHandler().
|
staticprotected |
Definition at line 68 of file Rw11VirtTermTcp.hpp.
Referenced by RcvPollHandler().
|
staticprotected |
Definition at line 69 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler(), and RcvPollHandler().
|
staticprotected |
Definition at line 70 of file Rw11VirtTermTcp.hpp.
Referenced by RcvPollHandler().
|
staticprotected |
Definition at line 71 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler(), RcvPollHandler(), and Snd().
|
staticprotected |
Definition at line 73 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler().
|
staticprotected |
Definition at line 74 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler().
|
staticprotected |
Definition at line 75 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler().
|
staticprotected |
Definition at line 76 of file Rw11VirtTermTcp.hpp.
|
staticprotected |
Definition at line 77 of file Rw11VirtTermTcp.hpp.
Referenced by ListenPollHandler().
|
staticprotected |
Definition at line 79 of file Rw11VirtTermTcp.hpp.
Referenced by Snd().
|
protected |
Definition at line 92 of file Rw11VirtTermTcp.hpp.
Referenced by Dump(), ListenPollHandler(), Open(), RcvPollHandler(), and ~Rw11VirtTermTcp().
|
protected |
Definition at line 93 of file Rw11VirtTermTcp.hpp.
Referenced by Connected(), Dump(), ListenPollHandler(), RcvPollHandler(), Snd(), and ~Rw11VirtTermTcp().
|
protected |
Definition at line 94 of file Rw11VirtTermTcp.hpp.
Referenced by Dump(), ListenPollHandler(), Open(), and RcvPollHandler().
|
protected |
Definition at line 95 of file Rw11VirtTermTcp.hpp.
Referenced by Dump(), ListenPollHandler(), Open(), and RcvPollHandler().
|
protected |
Definition at line 96 of file Rw11VirtTermTcp.hpp.
Referenced by Dump(), ListenPollHandler(), and Snd().