PTLib  Version 2.18.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
psockbun.h
Go to the documentation of this file.
1 /*
2  * psockbun.h
3  *
4  * Socket and interface bundle code
5  *
6  * Portable Windows Library
7  *
8  * Copyright (C) 2007 Post Increment
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Portable Windows Library.
21  *
22  * The Initial Developer of the Original Code is Post Increment
23  *
24  * Contributor(s): ______________________________________.
25  */
26 
27 #ifndef PTLIB_PSOCKBUN_H
28 #define PTLIB_PSOCKBUN_H
29 
30 #ifdef P_USE_PRAGMA
31 #pragma interface
32 #endif
33 
34 
35 #include <ptlib.h>
36 #include <ptlib/ipsock.h>
37 #include <ptlib/sockets.h>
38 #include <ptlib/safecoll.h>
39 #include <ptclib/pnat.h>
40 #include <map>
41 
42 
43 #define PINTERFACE_MONITOR_FACTORY_NAME "InterfaceMonitor"
44 
45 
47 
48 class PInterfaceFilter : public PObject {
49  PCLASSINFO(PInterfaceFilter, PObject);
50 
51  public:
52  virtual PIPSocket::InterfaceTable FilterInterfaces(const PIPSocket::Address & destination,
53  PIPSocket::InterfaceTable & interfaces) const = 0;
54 };
55 
56 
58 
68 {
70  public:
71  enum {
73  };
74 
76  unsigned refreshInterval = DefaultRefreshInterval,
77  bool runMonitorThread = true
78  );
79  virtual ~PInterfaceMonitor();
80 
83 
85  void SetRefreshInterval (unsigned refresh);
86 
88  void SetRunMonitorThread (bool runMonitorThread);
89 
95  void Start();
96 
98  void Stop();
99 
101 
107  bool includeLoopBack = false,
108  const PIPSocket::Address & destination = PIPSocket::GetDefaultIpAny()
110  );
111 
118  const PIPSocket::Address & binding,
119  const PIPSocket::Address & destination
120  );
121 
126  bool GetInterfaceInfo(
127  const PString & iface,
128  InterfaceEntry & info
129  ) const;
130 
135  static bool IsMatchingInterface(
136  const PString & iface,
137  const InterfaceEntry & entry
138  );
139 
143  {
144  InterfaceChange(const InterfaceEntry & entry, bool added)
145  : InterfaceEntry(entry)
146  , m_added(added)
147  { }
148 
149  const bool m_added;
150  };
151 
154 
156  #define PDECLARE_InterfaceNotifier(cls, fn) PDECLARE_NOTIFIER2(PInterfaceMonitor, cls, fn, PInterfaceMonitor::InterfaceChange)
157 
159  #define PCREATE_InterfaceNotifier(fn) PCREATE_NOTIFIER2(fn, PInterfaceMonitor::InterfaceChange)
160 
161  enum {
163  };
164 
167  void AddNotifier(
168  const Notifier & notifier,
169  unsigned priority = DefaultPriority
170  );
171  void RemoveNotifier(
172  const Notifier & notifier
173  );
174 
178  void SetInterfaceFilter(PInterfaceFilter * filter);
179  bool HasInterfaceFilter() const { return m_interfaceFilter != NULL; }
180 
181  protected:
182  virtual void OnShutdown();
183 
184  void UpdateThreadMain();
185 
186  virtual void RefreshInterfaceList();
187  virtual void OnInterfacesChanged(const PIPSocket::InterfaceTable & addedInterfaces, const PIPSocket::InterfaceTable & removedInterfaces);
188 
189  typedef std::multimap<unsigned, Notifier> Notifiers;
191  PDECLARE_MUTEX(m_notifiersMutex);
192 
193  PIPSocket::InterfaceTable m_interfaces;
194  PDECLARE_MUTEX(m_interfacesMutex);
195 
198  PDECLARE_MUTEX(m_threadMutex);
200 
203 
205 };
206 
207 
209 
216 {
217  PCLASSINFO(PMonitoredSockets, PSafeObject);
218  protected:
220  bool reuseAddr
221  P_NAT_PARAM(PNatMethods * natMethods)
222  );
223 
224  public:
226 
233  virtual PBoolean Open(
234  WORD port
235  ) = 0;
236 
238  PBoolean IsOpen() const { return m_opened; }
239 
241  virtual PBoolean Close() = 0;
242 
244  WORD GetPort() const { return m_localPort; }
245 
247  virtual bool SetQoS(
248  const PIPSocket::QoS & qos
249  ) = 0;
250 
252  virtual PBoolean GetAddress(
253  const PString & iface,
254  PIPSocket::Address & address,
255  WORD & port,
256  PBoolean usingNAT
257  ) const = 0;
258 
259  struct BundleParams {
261  : m_buffer(NULL)
262  , m_length(0)
263  , m_addr(0)
264  , m_port(0)
265  , m_lastCount(0)
266  , m_errorCode(PChannel::NoError)
267  , m_errorNumber(0)
268  { }
269 
270  void * m_buffer;
271  PINDEX m_length;
273  WORD m_port;
275  PINDEX m_lastCount;
279  };
280 
286  virtual void WriteToBundle(
287  BundleParams & param
288  ) = 0;
289 
296  virtual void ReadFromBundle(
297  BundleParams & param
298  ) = 0;
299 
306  virtual PStringArray GetInterfaces(
307  bool includeLoopBack = false,
308  const PIPSocket::Address & destination = PIPSocket::GetDefaultIpAny()
310  );
311 
316  virtual bool GetInterfaceInfo(
317  const PString & iface,
318  InterfaceEntry & info
319  ) const;
320 
337  static PMonitoredSockets * Create(
338  const PString & iface,
339  bool reuseAddr = false
340  P_NAT_PARAM(PNatMethods * natMethods = NULL)
341  );
342 
343  protected:
344  struct SocketInfo {
346  : m_socket(NULL)
347  , m_inUse(false)
348  { }
349  void Read(PMonitoredSockets & bundle, BundleParams & param);
350  void Write(BundleParams & param);
351 
353  bool m_inUse;
354  };
355  friend struct SocketInfo;
356 
357  bool CreateSocket(
358  SocketInfo & info,
359  const PIPSocket::Address & binding
360  );
361  bool DestroySocket(SocketInfo & info);
362  bool GetSocketAddress(
363  const SocketInfo & info,
364  PIPSocket::Address & address,
365  WORD & port,
366  bool usingNAT
367  ) const;
368 
369  void ReadFromSocketList(
370  PSocket::SelectList & readers,
371  PUDPSocket * & socket,
372  BundleParams & param
373  );
374 
377 #if P_NAT
378  PNatMethods * m_natMethods;
379 #endif
380 
381  bool m_opened;
384 };
385 
387 
388 
390 
395 {
396  PCLASSINFO(PMonitoredSocketChannel, PChannel);
397  public:
402  const PMonitoredSocketsPtr & sockets,
403  bool shared
404  );
406 
409  virtual PString GetName() const;
410  virtual PBoolean IsOpen() const;
411  virtual PBoolean Close();
412 
415  virtual PBoolean Read(
416  void * buffer,
417  PINDEX length
418  );
419 
422  virtual PBoolean Write(
423  const void * buffer,
424  PINDEX length
425  );
427 
433  void SetInterface(
434  const PString & iface
435  );
436 
439 
442  bool GetLocal(
443  PIPSocket::Address & address,
444  WORD & port,
445  bool usingNAT
446  );
447  bool GetLocal(
449  bool usingNAT
450  );
451 
453  void SetRemote(
454  const PIPSocket::Address & address,
455  WORD port
456  ) { m_remoteAP.SetAddress(address, port); }
457  void SetRemote(
458  const PIPSocket::AddressAndPort & ap
459  ) { m_remoteAP = ap; }
460 
462  void SetRemote(
463  const PString & hostAndPort
464  );
465 
467  void GetRemote(
468  PIPSocket::Address & addr,
469  WORD & port
470  ) const { addr = m_remoteAP.GetAddress(); port = m_remoteAP.GetPort(); }
471  void GetRemote(
473  ) const { ap = m_remoteAP; }
474 
480  bool flag
481  ) { m_promiscuousReads = flag; }
482 
485 
488  PIPSocket::Address & addr,
489  WORD & port
490  ) const { addr = m_lastReceivedAP.GetAddress(); port = m_lastReceivedAP.GetPort(); }
493  ) const { ap = m_lastReceivedAP; }
494 
497 
499  const PMonitoredSocketsPtr & GetMonitoredSockets() const { return m_socketBundle; }
501 
502  protected:
503  PMonitoredSocketsPtr m_socketBundle;
507  bool m_closing;
511  PDECLARE_MUTEX(m_mutex);
512 };
513 
514 
516 
521 {
523  public:
525  const PString & fixedInterface,
526  unsigned ipVersion,
527  bool reuseAddr
528  P_NAT_PARAM(PNatMethods * natMethods = NULL)
529  );
531 
538  virtual PStringArray GetInterfaces(
539  bool includeLoopBack = false,
540  const PIPSocket::Address & destination = PIPSocket::GetDefaultIpAny()
542  );
543 
550  virtual PBoolean Open(
551  WORD port
552  );
553 
555  virtual PBoolean Close();
556 
558  virtual bool SetQoS(
559  const PIPSocket::QoS & qos
560  );
561 
563  virtual PBoolean GetAddress(
564  const PString & iface,
565  PIPSocket::Address & address,
566  WORD & port,
567  PBoolean usingNAT
568  ) const;
569 
575  virtual void WriteToBundle(
576  BundleParams & param
577  );
578 
585  virtual void ReadFromBundle(
586  BundleParams & param
587  );
588 
589  protected:
592 
593  typedef std::map<std::string, SocketInfo> SocketInfoMap_T;
594 
595  void OpenSocket(const PString & iface);
596  void CloseSocket(SocketInfoMap_T::iterator iterSocket);
597 
600  unsigned m_ipVersion;
601 };
602 
603 
605 
611 {
613  public:
615  const PString & theInterface,
616  bool reuseAddr
617  P_NAT_PARAM(PNatMethods * natMethods = NULL)
618  );
620 
625  virtual PStringArray GetInterfaces(
626  bool includeLoopBack = false,
627  const PIPSocket::Address & destination = PIPSocket::GetDefaultIpAny()
629  );
630 
637  virtual PBoolean Open(
638  WORD port
639  );
640 
642  virtual PBoolean Close();
643 
645  virtual bool SetQoS(
646  const PIPSocket::QoS & qos
647  );
648 
650  virtual PBoolean GetAddress(
651  const PString & iface,
652  PIPSocket::Address & address,
653  WORD & port,
654  PBoolean usingNAT
655  ) const;
656 
662  virtual void WriteToBundle(
663  BundleParams & param
664  );
665 
672  virtual void ReadFromBundle(
673  BundleParams & param
674  );
675 
676 
677  protected:
680 
681  bool IsInterface(const PString & iface) const;
682 
686 };
687 
688 
689 #endif // PTLIB_PSOCKBUN_H
690 
691 
692 // End Of File ///////////////////////////////////////////////////////////////
Class for detector of Route Table changes.
Definition: ipsock.h:691
WORD GetPort() const
Return the local port number being used by the socket(s)
Definition: psockbun.h:244
void SetInterface(const PString &iface)
Set the interface descriptor to be used for all reads/writes to this channel.
static PMonitoredSockets * Create(const PString &iface, bool reuseAddr=falseP_NAT_PARAM(PNatMethods *natMethods=NULL))
Create a new monitored socket instance based on the interface descriptor.
bool IsInterface(const PString &iface) const
bool GetInterfaceInfo(const PString &iface, InterfaceEntry &info) const
Return information about an active interface given the descriptor string.
Notifiers m_notifiers
Definition: psockbun.h:190
PIPSocket::Address m_addr
Remote IP address data came from, or is written to.
Definition: psockbun.h:272
virtual PBoolean GetAddress(const PString &iface, PIPSocket::Address &address, WORD &port, PBoolean usingNAT) const
Get the local address for the given interface.
virtual PBoolean Read(void *buffer, PINDEX length)
Override of PChannel functions to allow connectionless reads.
friend class PInterfaceMonitorClient
Definition: psockbun.h:204
PDECLARE_InterfaceNotifier(PMonitoredSocketBundle, OnInterfaceChange)
void * m_buffer
Data to read/write.
Definition: psockbun.h:270
PUDPSocket * m_socket
Definition: psockbun.h:352
PIPSocket::InterfaceEntry InterfaceEntry
Definition: psockbun.h:225
void CloseSocket(SocketInfoMap_T::iterator iterSocket)
virtual PStringArray GetInterfaces(bool includeLoopBack=false, const PIPSocket::Address &destination=PIPSocket::GetDefaultIpAny())
Get an array of all current interface descriptors, possibly including the loopback (127...
PIPSocketAddressAndPort m_lastReceivedAP
Definition: psockbun.h:509
virtual PBoolean Open(WORD port)
Open the socket(s) using the specified port.
virtual PBoolean GetAddress(const PString &iface, PIPSocket::Address &address, WORD &port, PBoolean usingNAT) const =0
Get the local address for the given interface.
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:51
PInterfaceMonitor(unsigned refreshInterval=DefaultRefreshInterval, bool runMonitorThread=true)
PString m_interface
Definition: psockbun.h:683
virtual PBoolean Close()
Close all socket(s)
#define P_NAT_PARAM(...)
Definition: pnat.h:637
static bool IsMatchingInterface(const PString &iface, const InterfaceEntry &entry)
Returns whether the descriptor string equals the interface entry.
PNotifierTemplate< InterfaceChange > Notifier
Type for disposition notifiers.
Definition: psockbun.h:153
PChannel::Errors m_errorCode
Error code for read/write.
Definition: psockbun.h:277
PINDEX m_length
Maximum length of data.
Definition: psockbun.h:271
PBoolean IsOpen() const
Indicate if the socket(s) are open and ready for reads/writes.
Definition: psockbun.h:238
virtual PString GetName() const
Get the platform and I/O channel type name of the channel.
virtual bool SetQoS(const PIPSocket::QoS &qos)
Set the quality of service for sockets.
virtual PBoolean Close()=0
Close all socket(s)
This is a base class for UDP socket(s) that are monitored for interface changes.
Definition: psockbun.h:215
A socket channel that uses the UDP transport on the Internet Protocol.
Definition: udpsock.h:42
Describe an interface table entry.
Definition: ipsock.h:713
virtual ~PInterfaceMonitor()
virtual void RefreshInterfaceList()
PDECLARE_MUTEX(m_notifiersMutex)
virtual void OnInterfacesChanged(const PIPSocket::InterfaceTable &addedInterfaces, const PIPSocket::InterfaceTable &removedInterfaces)
virtual PBoolean Close()
Close the channel, shutting down the link to the data source.
SocketInfoMap_T m_socketInfoMap
Definition: psockbun.h:598
bool m_closing
Definition: psockbun.h:507
void SetRemote(const PIPSocket::Address &address, WORD port)
Set the remote address/port for all Write() functions.
Definition: psockbun.h:453
WORD m_port
Remote port data came from, or is written to.
Definition: psockbun.h:273
Definition: psockbun.h:344
List of sockets used for Select() function.
Definition: socket.h:312
PSingleMonitoredSocket(const PString &theInterface, bool reuseAddrP_NAT_PARAM(PNatMethods *natMethods=NULL))
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
bool IsValidBindingForDestination(const PIPSocket::Address &binding, const PIPSocket::Address &destination)
Returns whether destination is reachable through binding or not.
PIPSocketAddressAndPort m_remoteAP
Definition: psockbun.h:508
bool CreateSocket(SocketInfo &info, const PIPSocket::Address &binding)
PTimeInterval m_timeout
Time to wait for data.
Definition: psockbun.h:276
virtual PBoolean Open(WORD port)
Open the socket(s) using the specified port.
bool m_inUse
Definition: psockbun.h:353
PIPSocket::InterfaceEntry InterfaceEntry
Definition: psockbun.h:100
This is an array collection class of PString objects.
Definition: pstring.h:2365
Definition: psockbun.h:48
PString m_lastReceivedInterface
Definition: psockbun.h:510
Definition: ipsock.h:879
A class describing an IP address and port number combination.
Definition: ipsock.h:278
PInterfaceMonitor::Notifier m_onInterfaceChange
Definition: psockbun.h:591
PSafePtr< PMonitoredSockets > PMonitoredSocketsPtr
Definition: psockbun.h:386
virtual PBoolean Write(const void *buffer, PINDEX length)
Override of PChannel functions to allow connectionless writes.
virtual void WriteToBundle(BundleParams &param)=0
Write to the remote address/port using the socket(s) available.
Errors
Normalised error codes.
Definition: channel.h:227
void SetAddress(const PIPSocket::Address &addr, WORD port=0)
bool m_sharedBundle
Definition: psockbun.h:504
bool GetLocal(PIPSocket::Address &address, WORD &port, bool usingNAT)
Get the local IP address and port for the currently selected interface.
PString GetLastReceivedInterface() const
Get the interface the last received UDP data was recieved on.
Definition: psockbun.h:496
PINDEX m_lastCount
Actual length of data read/written.
Definition: psockbun.h:275
void SetRunMonitorThread(bool runMonitorThread)
Change whether the monitor thread should run.
virtual PStringArray GetInterfaces(bool includeLoopBack=false, const PIPSocket::Address &destination=PIPSocket::GetDefaultIpAny())
Get an array of all current interface descriptors, possibly including the loopback (127...
unsigned m_ipVersion
Definition: psockbun.h:600
This class can be used to access the bundled/monitored UDP sockets using the PChannel API...
Definition: psockbun.h:394
PMonitoredSockets(bool reuseAddrP_NAT_PARAM(PNatMethods *natMethods))
virtual PBoolean GetAddress(const PString &iface, PIPSocket::Address &address, WORD &port, PBoolean usingNAT) const
Get the local address for the given interface.
virtual void ReadFromBundle(BundleParams &param)
Read fram a remote address/port using the socket(s) available.
Definition: psockbun.h:259
virtual void OnShutdown()
bool m_promiscuousReads
Definition: psockbun.h:506
void RemoveNotifier(const Notifier &notifier)
void Write(BundleParams &param)
This concrete class bundles a set of UDP sockets which are dynamically adjusted as interfaces are add...
Definition: psockbun.h:520
Abstract class defining I/O channel semantics.
Definition: channel.h:103
This class defines a thread-safe object in a collection.
Definition: safecoll.h:123
bool m_opened
Definition: psockbun.h:381
virtual bool SetQoS(const PIPSocket::QoS &qos)
Set the quality of service for sockets.
PString m_currentInterface
Definition: psockbun.h:505
virtual void ReadFromBundle(BundleParams &param)
Read fram a remote address/port using the socket(s) available.
bool PBoolean
Definition: object.h:174
virtual PIPSocket::InterfaceTable FilterInterfaces(const PIPSocket::Address &destination, PIPSocket::InterfaceTable &interfaces) const =0
void Read(PMonitoredSockets &bundle, BundleParams &param)
WORD GetPort() const
Definition: ipsock.h:320
virtual void WriteToBundle(BundleParams &param)
Write to the remote address/port using the socket(s) available.
PIPSocket::QoS m_qos
Definition: psockbun.h:383
void AddNotifier(const Notifier &notifier, unsigned priority=DefaultPriority)
Add a notifier for interface changes.
std::multimap< unsigned, Notifier > Notifiers
Definition: psockbun.h:189
BundleParams()
Definition: psockbun.h:260
The character string class.
Definition: pstring.h:108
void GetRemote(PIPSocketAddressAndPort &ap) const
Definition: psockbun.h:471
virtual PBoolean IsOpen() const
Determine if the channel is currently open.
PCaselessString m_fixedInterface
Definition: psockbun.h:599
This concrete class monitors a single scoket bound to a specific interface or address.
Definition: psockbun.h:610
This class is a singleton that will monitor the network interfaces on a machine and update a list aof...
Definition: psockbun.h:67
PThread * m_updateThread
Definition: psockbun.h:199
const PMonitoredSocketsPtr & GetMonitoredSockets() const
Get the monitored socket bundle being used by this channel.
Definition: psockbun.h:499
bool DestroySocket(SocketInfo &info)
InterfaceEntry m_entry
Definition: psockbun.h:684
PMonitoredSocketChannel(const PMonitoredSocketsPtr &sockets, bool shared)
Construct a monitored socket bundle channel.
virtual void WriteToBundle(BundleParams &param)
Write to the remote address/port using the socket(s) available.
void GetLastReceived(PIPSocketAddressAndPort &ap) const
Definition: psockbun.h:491
This class defines a thread of execution in the system.
Definition: thread.h:66
void ReadFromSocketList(PSocket::SelectList &readers, PUDPSocket *&socket, BundleParams &param)
PString m_iface
Interface to use for read or write, also then one data was read on.
Definition: psockbun.h:274
virtual PStringArray GetInterfaces(bool includeLoopBack=false, const PIPSocket::Address &destination=PIPSocket::GetDefaultIpAny())
Get an array of all current interface descriptors, possibly including the loopback (127...
PIPSocket::RouteTableDetector * m_changedDetector
Definition: psockbun.h:202
Information on the interface change.
Definition: psockbun.h:142
PInterfaceMonitor::Notifier m_onInterfaceChange
Definition: psockbun.h:679
void GetRemote(PIPSocket::Address &addr, WORD &port) const
Get the current remote address/port for all Write() functions.
Definition: psockbun.h:467
PTimeInterval m_refreshInterval
Definition: psockbun.h:197
void SetRefreshInterval(unsigned refresh)
Change the refresh interval.
Class for a factory to create concrete class instances without parameters during construction.
Definition: pfactory.h:396
A class describing an IP address.
Definition: ipsock.h:59
Definition: psockbun.h:162
virtual void ReadFromBundle(BundleParams &param)=0
Read fram a remote address/port using the socket(s) available.
PStringArray GetInterfaces(bool includeLoopBack=false, const PIPSocket::Address &destination=PIPSocket::GetDefaultIpAny())
Get an array of all current interface descriptors, possibly including the loopback (127...
PIPSocket::InterfaceTable m_interfaces
Definition: psockbun.h:193
static const PIPSocket::Address & GetDefaultIpAny()
Definition: pprocess.h:786
void Stop()
Stop monitoring network interfaces.
PFACTORY_GET_SINGLETON(PProcessStartupFactory, PInterfaceMonitor)
Return the singleton interface for the network monitor.
void SetPromiscuous(bool flag)
Set flag for receiving UDP data from any remote address.
Definition: psockbun.h:479
virtual PBoolean Open(WORD port)=0
Open the socket(s) using the specified port.
const PIPSocket::Address & GetAddress() const
Definition: ipsock.h:313
void Start()
Start monitoring network interfaces.
bool GetSocketAddress(const SocketInfo &info, PIPSocket::Address &address, WORD &port, bool usingNAT) const
PUDPSocket m_interfaceAddedSignal
Definition: psockbun.h:382
PMonitoredSocketsPtr m_socketBundle
Definition: psockbun.h:503
PString GetInterface()
Get the current interface descriptor being used/.
void GetLastReceived(PIPSocket::Address &addr, WORD &port) const
Get the IP address and port of the last received UDP data.
Definition: psockbun.h:487
SocketInfo m_info
Definition: psockbun.h:685
PDECLARE_InterfaceNotifier(PSingleMonitoredSocket, OnInterfaceChange)
void SetInterfaceFilter(PInterfaceFilter *filter)
Sets the monitor&#39;s interface filter.
virtual bool GetInterfaceInfo(const PString &iface, InterfaceEntry &info) const
Return information about an active interface given the descriptor string.
std::map< std::string, SocketInfo > SocketInfoMap_T
Definition: psockbun.h:593
InterfaceChange(const InterfaceEntry &entry, bool added)
Definition: psockbun.h:144
virtual bool SetQoS(const PIPSocket::QoS &qos)=0
Set the quality of service for sockets.
bool m_reuseAddress
Definition: psockbun.h:376
const bool m_added
Definition: psockbun.h:149
virtual PBoolean Close()
Close all socket(s)
int m_errorNumber
Error number (OS specific) for read/write.
Definition: psockbun.h:278
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
bool GetPromiscuous()
Get flag for receiving UDP data from any remote address.
Definition: psockbun.h:484
SocketInfo()
Definition: psockbun.h:345
PMonitoredSocketBundle(const PString &fixedInterface, unsigned ipVersion, bool reuseAddrP_NAT_PARAM(PNatMethods *natMethods=NULL))
PInterfaceFilter * m_interfaceFilter
Definition: psockbun.h:201
void OpenSocket(const PString &iface)
WORD m_localPort
Definition: psockbun.h:375
bool m_runMonitorThread
Definition: psockbun.h:196
bool HasInterfaceFilter() const
Definition: psockbun.h:179
void SetRemote(const PIPSocket::AddressAndPort &ap)
Definition: psockbun.h:457