VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
eventManagerTCP.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #ifdef BACKEND_PLUGIN
11 #endif
12 #include <vlutil/vlInetTcpSocket.h>
13 
18 
19 class DtInetSocket;
20 
21 struct DtNetPduHeader;
22 
23 #ifdef BACKEND_PLUGIN
25 #else
27 #endif
28 {
29 public:
32 
34  virtual ~DtEventManagerTCP();
35 
38  virtual bool selfReflecting(const DtEvent&) const;
39 
40 protected:
42  virtual bool sendNetworkEvent(const DtEvent&);
43 
44  virtual void processPdu(void* buffer, int size);
45 
47  virtual bool pduHeader(DtNetPduHeader&, DtInetSocket*);
48 
50  virtual bool processSocket(DtInetSocket*);
51 
52  virtual char* getPacketForNetwork(const DtDataInteraction* inter, size_t& length) const;
53  virtual DtDataInteraction* createDataInteraction(void* buffer, size_t size) const;
54 
55  virtual bool sendEventTCP(const DtEvent& e);
56 
58  virtual bool sendPacketOnNetwork(char* buffer, size_t length) = 0;
59 
61  virtual bool hasNetworkConnection() const = 0;
62 };
virtual bool selfReflecting() const
Wether or not an event added will be processed locally. Default is true.
DtEventManagerTCP()
CTOR.
Specialized class of the network event manager to process extended influence interactions This class ...
Definition: vrfNetworkEventManager.h:17
voidpf void uLong size
Definition: ioapi.h:39
virtual bool sendPacketOnNetwork(char *buffer, size_t length)=0
Sends the given buffer packet on the network.
Definition: events.h:47
virtual void processPdu(void *buffer, int size)
virtual bool hasNetworkConnection() const =0
Return true if the TCP network is active.
Definition: networkEventManager.h:40
virtual bool sendEventTCP(const DtEvent &e)
virtual DtDataInteraction * createDataInteraction(void *buffer, size_t size) const
Definition: eventManagerTCP.h:26
virtual ~DtEventManagerTCP()
DTOR.
virtual bool sendNetworkEvent(const DtEvent &)
This is the method that is used to send the message over the TCP socket.
virtual bool processSocket(DtInetSocket *)
Processes the socket, and, if there is an error, remove it.
virtual bool pduHeader(DtNetPduHeader &, DtInetSocket *)
If there is a net pdu header read it.
virtual char * getPacketForNetwork(const DtDataInteraction *inter, size_t &length) const

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)