VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
serverEventManagerTCP.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 
8 #include "eventManagerTCP.h"
9 
14 
15 class DtInetSocketMgr;
16 class DtInetSocket;
17 
18 struct DtNetPduHeader;
19 
21 {
22 public:
25 
27  virtual ~DtServerEventManagerTCP();
28 
30  static DtEventManager* creator();
31 
33  virtual void tick();
34 
36  virtual bool hasNetworkConnection() const;
37 
40 
41 protected:
42  static bool socketConnectedCallback(DtInetSocket* sock, void* usr);
43  virtual bool processSocketConnected(DtInetSocket* sock);
44 
45  static bool socketRemovedCallback(DtInetSocket* sock, void* usr);
46  virtual bool processSocketRemoved(DtInetSocket* sock);
47 
48  static int receivedInteractionCallback( DtInetSocket* sock, int size,
49  DtInetBufferChain& buffChain,
50  DtInetEndpoint& ep, void* usr);
51 
53  virtual bool sendPacketOnNetwork(char* buffer, size_t length);
54 
55 protected:
56  DtInetSocketMgr* mySocketMgr;
57  std::set<DtInetSocket*> mySockets;
58 };
virtual void installExerciseConnectionCallbacks()
Override to remove data interaction callback.
virtual ~DtServerEventManagerTCP()
DTOR.
virtual bool hasNetworkConnection() const
Return true if the TCP network is active.
static bool socketConnectedCallback(DtInetSocket *sock, void *usr)
static DtEventManager * creator()
Static creator method.
voidpf void uLong size
Definition: ioapi.h:39
DtInetSocketMgr * mySocketMgr
Definition: serverEventManagerTCP.h:56
static bool socketRemovedCallback(DtInetSocket *sock, void *usr)
virtual bool processSocketRemoved(DtInetSocket *sock)
virtual bool sendPacketOnNetwork(char *buffer, size_t length)
Sends the given buffer packet on the network.
virtual void tick()
Tick the socket manager to see about connections.
Definition: eventManager.h:23
Definition: eventManagerTCP.h:26
static int receivedInteractionCallback(DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
Definition: serverEventManagerTCP.h:20
std::set< DtInetSocket * > mySockets
Definition: serverEventManagerTCP.h:57
virtual bool processSocketConnected(DtInetSocket *sock)

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)