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"
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.
50  // Rx That has not been fully filled. Out of order.
52 
53  public:
54  cNetTOP(const BYTE* pSecretKey);
55  ~cNetTOP(void);
56  };
57 
58 }
59 #endif
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cNetSocket.h:185
Definition: cNetTOP.h:19
Definition: cHeap.h:156
Definition: cStream.h:66
Definition: cStream.h:456
Definition: cTimeSys.h:93
Definition: cMesh.h:22