w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11VirtTermTcp.hpp
Go to the documentation of this file.
1// $Id: Rw11VirtTermTcp.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-2017 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2017-04-07 868 1.0.2 Dump(): add detail arg
8// 2013-04-20 508 1.0.1 add fSndPreConQue handling
9// 2013-03-06 495 1.0 Initial version
10// 2013-02-13 488 0.1 First draft
11// ---------------------------------------------------------------------------
12
13
18#ifndef included_Retro_Rw11VirtTermTcp
19#define included_Retro_Rw11VirtTermTcp 1
20
21#include <deque>
22
23#include "Rw11VirtTerm.hpp"
24
25namespace Retro {
26
28 public:
29
30 explicit Rw11VirtTermTcp(Rw11Unit* punit);
32
33 virtual bool Open(const std::string& url, RerrMsg& emsg);
34
35 virtual bool Snd(const uint8_t* data, size_t count, RerrMsg& emsg);
36
37 virtual void Dump(std::ostream& os, int ind=0, const char* text=0,
38 int detail=0) const;
39
40 // statistics counter indices
41 enum stats {
49 };
50
51 protected:
52
53 bool Connected() const;
54 int ListenPollHandler(const pollfd& pfd);
55 int RcvPollHandler(const pollfd& pfd);
56
57 // some constants (also defined in cpp)
58 static const uint8_t kCode_NULL = 0;
59 static const uint8_t kCode_LF = 10;
60 static const uint8_t kCode_CR = 13;
61 static const uint8_t kCode_ESC = 27;
62 static const uint8_t kCode_SE = 240;
63 static const uint8_t kCode_NOP = 241;
64 static const uint8_t kCode_IP = 244;
65 static const uint8_t kCode_GA = 249;
66 static const uint8_t kCode_SB = 250;
67 static const uint8_t kCode_WILL = 251;
68 static const uint8_t kCode_WONT = 252;
69 static const uint8_t kCode_DO = 253;
70 static const uint8_t kCode_DONT = 254;
71 static const uint8_t kCode_IAC = 255;
72
73 static const uint8_t kOpt_BIN = 0;
74 static const uint8_t kOpt_ECHO = 1;
75 static const uint8_t kOpt_SGA = 3;
76 static const uint8_t kOpt_TTYP = 24;
77 static const uint8_t kOpt_LINE = 34;
78
79 static const size_t kPreConQue_limit = 65536;
80
89 };
90
91 protected:
93 int fFd;
96 std::deque<uint8_t> fSndPreConQue;
97 };
98
99} // end namespace Retro
100
101#include "Rw11VirtTermTcp.ipp"
102
103#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: Rw11Unit.hpp:39
static const uint8_t kCode_WILL
static const uint8_t kCode_DONT
static const uint8_t kCode_IP
static const size_t kPreConQue_limit
std::deque< uint8_t > fSndPreConQue
static const uint8_t kOpt_TTYP
static const uint8_t kCode_SB
static const uint8_t kOpt_LINE
bool Connected() const
FIXME_docs.
virtual bool Open(const std::string &url, RerrMsg &emsg)
FIXME_docs.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
static const uint8_t kOpt_ECHO
static const uint8_t kCode_WONT
int RcvPollHandler(const pollfd &pfd)
FIXME_docs.
static const uint8_t kCode_NOP
static const uint8_t kCode_GA
static const uint8_t kCode_ESC
static const uint8_t kCode_NULL
static const uint8_t kCode_IAC
static const uint8_t kOpt_SGA
int ListenPollHandler(const pollfd &pfd)
FIXME_docs.
static const uint8_t kCode_DO
virtual bool Snd(const uint8_t *data, size_t count, RerrMsg &emsg)
FIXME_docs.
static const uint8_t kCode_SE
static const uint8_t kOpt_BIN
static const uint8_t kCode_LF
static const uint8_t kCode_CR
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47