Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cNetTOP.h
Go to the documentation of this file.
1
//
4
//
5
6
#ifndef _INC_cNetTOP_H
7
#define _INC_cNetTOP_H
8
#ifndef NO_PRAGMA_ONCE
9
#pragma once
10
#endif
11
12
#include "../Net/cNetSocket.h"
13
#include "
GrayCore/include/cStreamQueue.h
"
14
#include "
GrayCore/include/cTimeSys.h
"
15
16
namespace
GrayLib
17
{
18
class
GRAYLIB_LINK
cNetTOP
:
public
cStream
,
public
cStreamStats
19
{
34
35
struct
CPacket
36
{
37
// A Packet I am sending or trying to send. I don't know if it got received successfully.
38
cHeapBlock
m_Data;
// packet payload. What can fit in a UDP frame. unencrypted.
39
cTimeSys
m_t;
// When received/sent last ?
40
bool
m_bControlPacket;
// This is an CAck ?
41
};
42
43
public
:
44
static
const
size_t
k_iSizeUnit = 512;
// normally send a packet >= size bytes. all counts are units of this. assume both sides agree.
45
46
private
:
47
cNetSocket
m_Socket;
48
// Tx That has not been fully ACKed.
49
cArrayStruct<CPacket>
m_Tx;
50
// Rx That has not been fully filled. Out of order.
51
cArrayStruct<CPacket>
m_Rx;
52
53
public
:
54
cNetTOP
(
const
BYTE* pSecretKey);
55
~
cNetTOP
(
void
);
56
};
57
58
}
59
#endif
GRAYLIB_LINK
#define GRAYLIB_LINK
Definition:
GrayLibBase.h:35
cStreamQueue.h
cTimeSys.h
GrayLib::cNetSocket
Definition:
cNetSocket.h:185
GrayLib::cNetTOP
Definition:
cNetTOP.h:19
Gray::cArrayStruct< CPacket >
Gray::cHeapBlock
Definition:
cHeap.h:156
Gray::cStreamStats
Definition:
cStream.h:66
Gray::cStream
Definition:
cStream.h:456
Gray::cTimeSys
Definition:
cTimeSys.h:93
GrayLib
Definition:
cMesh.h:22
GrayLib
include
Proto
cNetTOP.h
Generated on Tue Feb 2 2021 11:29:42 for Gray C++ Libraries by
1.9.1