VR-Forces Developer's Guide
 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() override;
28 
30  static DtEventManager* creator();
31 
33  virtual void tick() override;
34 
36  virtual bool hasNetworkConnection() const override;
37 
38 protected:
39  static bool socketConnectedCallback(DtInetSocket* sock, void* usr);
40  virtual bool processSocketConnected(DtInetSocket* sock);
41 
42  static bool socketRemovedCallback(DtInetSocket* sock, void* usr);
43  virtual bool processSocketRemoved(DtInetSocket* sock);
44 
45  static int receivedInteractionCallback( DtInetSocket* sock, int size,
46  DtInetBufferChain& buffChain,
47  DtInetEndpoint& ep, void* usr);
48 
50  virtual bool sendPacketOnNetwork(char* buffer, size_t length) override;
51 
52 protected:
53  DtInetSocketMgr* mySocketMgr;
54  std::set<DtInetSocket*> mySockets;
55 };
virtual bool sendPacketOnNetwork(char *buffer, size_t length) override
Sends the given buffer packet on the network.
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:53
static bool socketRemovedCallback(DtInetSocket *sock, void *usr)
virtual bool processSocketRemoved(DtInetSocket *sock)
virtual void tick() override
Tick the socket manager to see about connections.
virtual bool hasNetworkConnection() const override
Return true if the TCP network is active.
Definition: eventManagerTCP.h:35
static int receivedInteractionCallback(DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
Definition: serverEventManagerTCP.h:20
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
std::set< DtInetSocket * > mySockets
Definition: serverEventManagerTCP.h:54
virtual bool processSocketConnected(DtInetSocket *sock)
virtual ~DtServerEventManagerTCP() override
DTOR.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)