VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlInetEndpoint.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
8 #pragma once
9 
10 #include <vlutil/vlInet.h>
11 #include <vlutil/vlInetAddr.h>
12 #include <vlutil/vlInetAddrUtils.h>
13 #include <vlutil/vlString.h>
14 
15 
16 #ifdef DtUSE_UTILITIES_NAMESPACE
17 namespace DtUSE_UTILITIES_NAMESPACE
18 {
19 #endif
20 
23 {
28 };
29 
35 {
36 public:
37 
40 
50  // with. If addr specifies a remote unicast address, broadcast address, or
54  DtInetEndpoint( const DtInetAddr& addr, DtU16 port = 0,
56 
73  // with. If the network resource locator resolves to a remote unicast
77  DtInetEndpoint( DtString& netResLoc, DtU16 port = 0,
80 
82  virtual ~DtInetEndpoint();
83 
85  DtInetEndpoint( const DtInetEndpoint& orig );
86 
88  DtInetEndpoint& operator=(const DtInetEndpoint& orig);
89 
93  virtual void hostLookup( DtString& addr, DtU16 port = 0,
95 
97  virtual void setEndpoint( DtInetProtocol protocol, const DtInetAddr& addr, DtU16 port );
98 
105 
109  virtual void setAddress( const DtInetAddr& addr );
110  virtual const DtInetAddr& address() const;
112 
116  virtual void setPort( DtU16 port );
117  virtual DtU16 port() const;
119 
123  virtual void setProtocol( DtInetProtocol protocol );
124  virtual DtInetProtocol protocol() const;
126 
128 
130  virtual DtInetUtils::DtInetAddrFamily family() const;
131 
134  virtual bool isIPv4() const;
135  virtual bool isIPv6() const;
136  virtual bool isTcp() const;
137  virtual bool isTls() const;
138  virtual bool isUdp() const;
140 
144  virtual int toSockaddr( struct sockaddr_in* s );
145  virtual int toSockaddr( struct sockaddr_in6* s );
147 
157  virtual const DtString& toDtString( bool showProtocol = false ) const;
158 
161  virtual bool isOk();
162 
164  virtual DtString getLastErrorString();
165 
167  virtual void* boostEndpoint();
168 
172  virtual void* tcpEndpoint();
173  virtual void* tlsEndpoint();
174  virtual void* udpEndpoint();
176 
179  friend DT_DLL_VLUTIL bool operator==( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
180  friend DT_DLL_VLUTIL bool operator!=( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
181  friend DT_DLL_VLUTIL bool operator<( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
182  friend DT_DLL_VLUTIL bool operator>( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
183 // virtual bool operator==( const DtInetEndpoint& addr );
185 
186 protected:
187  void initEndpoint();
188 
189 protected:
193 
197 
198  bool myError;
200 
207 
208 };
209 // end of class DtInetEndpoint
210 
211 #ifdef DtUSE_UTILITIES_NAMESPACE
212 }
213 #endif
214 
Definition: vlInetEndpoint.h:26
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
Definition: vlInetAddrUtils.h:58
DtInetAddr myAddr
Definition: vlInetEndpoint.h:194
Definition: vlInetEndpoint.h:25
Definition: vlInetAddrUtils.h:60
Contains the DtString class declaration.
DtString myLastErrorString
Definition: vlInetEndpoint.h:199
void * myTlsEndpoint
Definition: vlInetEndpoint.h:191
DtString myMutableFullString
Definition: vlInetEndpoint.h:206
void * myTcpEndpoint
Definition: vlInetEndpoint.h:190
DtU16 myPort
Definition: vlInetEndpoint.h:195
bool myError
Definition: vlInetEndpoint.h:198
DtInetAddrFamily
Definition: vlInetAddrUtils.h:55
bool myMutableStringsInitialized
These are mutable so that the string can be initialized only if needed, but may then be stored to avo...
Definition: vlInetEndpoint.h:204
The DtInetEndpoint class provides a protocol independant, address family independent mechanism to rep...
Definition: vlInetEndpoint.h:34
Represents a IPv4 or IPv6 address.
Definition: vlInetAddr.h:36
This file declares useful defaults constants and static methods for IP address handling.
Definition: vlInetEndpoint.h:27
DtString myMutableShortString
Definition: vlInetEndpoint.h:205
This file contains the declaration of the DtInetAddr class.
DtInetProtocol
Specifies the protocol used by the endpoint.
Definition: vlInetEndpoint.h:22
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:152
DtInetProtocol myProtocol
Definition: vlInetEndpoint.h:196
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
Definition: vlInetEndpoint.h:24
void * myUdpEndpoint
Definition: vlInetEndpoint.h:192
Instances of DtString are used to represent strings.
Definition: vlString.h:38
const bool operator<(const DtU128 &lhs, const DtU128 &rhs)
const bool operator>(const DtU128 &lhs, const DtU128 &rhs)
This file declares useful defaults constants and static methods employed with the networking abstract...
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:121

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)