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-2010 VT MAK
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 {
27 };
28 
34 {
35 public:
36 
39 
49  // with. If addr specifies a remote unicast address, broadcast address, or
53  DtInetEndpoint( const DtInetAddr& addr, DtU16 port = 0,
55 
72  // with. If the network resource locator resolves to a remote unicast
76  DtInetEndpoint( DtString& netResLoc, DtU16 port = 0,
79 
81  virtual ~DtInetEndpoint();
82 
84  DtInetEndpoint( const DtInetEndpoint& orig );
85 
87  DtInetEndpoint& operator=(const DtInetEndpoint& orig);
88 
92  virtual void hostLookup( DtString& addr, DtU16 port = 0,
94 
98  virtual void setAddress( const DtInetAddr& addr );
99  virtual const DtInetAddr& address() const;
100 
104  virtual void setPort( DtU16 port );
105  virtual DtU16 port() const;
106 
112  virtual void setProtocol( DtInetProtocol protocol );
113  virtual DtInetProtocol protocol() const;
114 
116  virtual DtInetUtils::DtInetAddrFamily family() const;
117 
120  virtual void setEndpoint( DtInetProtocol protocol, const DtInetAddr& addr, DtU16 port );
121 
124  virtual bool isIPv4() const;
125  virtual bool isIPv6() const;
126  virtual bool isTcp() const;
127  virtual bool isUdp() const;
129 
133  virtual int toSockaddr( struct sockaddr_in* s );
134  virtual int toSockaddr( struct sockaddr_in6* s );
136 
146  virtual const DtString& toDtString( bool showProtocol = false ) const;
147 
150  virtual bool isOk();
151 
153  virtual DtString getLastErrorString();
154 
155 
157  virtual void* tcpEndpoint();
158  virtual void* udpEndpoint();
159 
162  friend DT_DLL_VLUTIL bool operator==( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
163  friend DT_DLL_VLUTIL bool operator!=( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
164  friend DT_DLL_VLUTIL bool operator<( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
165  friend DT_DLL_VLUTIL bool operator>( const DtInetEndpoint& ep1, const DtInetEndpoint& ep2 );
166 // virtual bool operator==( const DtInetEndpoint& addr );
168 
169 protected:
170  void initEndpoint();
171 
172 protected:
175 
179 
180  bool myError;
182 
189 
191 
192 };
193 // end of class DtInetEndpoint
194 
195 #ifdef DtUSE_UTILITIES_NAMESPACE
196 }
197 #endif
198 

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)