This concrete class monitors a single scoket bound to a specific interface or address.
More...
|
| | PSingleMonitoredSocket (const PString &theInterface, bool reuseAddr=false, PNatMethod *natMethod=NULL) |
| |
| | ~PSingleMonitoredSocket () |
| |
| 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.0.0.1) interface. More...
|
| |
| virtual PBoolean | Open (WORD port) |
| | Open the socket(s) using the specified port. More...
|
| |
| virtual PBoolean | Close () |
| | Close all socket(s) More...
|
| |
| virtual PBoolean | GetAddress (const PString &iface, PIPSocket::Address &address, WORD &port, PBoolean usingNAT) const |
| | Get the local address for the given interface. More...
|
| |
| virtual PChannel::Errors | WriteToBundle (const void *buf, PINDEX len, const PIPSocket::Address &addr, WORD port, const PString &iface, PINDEX &lastWriteCount) |
| | Write to the remote address/port using the socket(s) available. More...
|
| |
| virtual PChannel::Errors | ReadFromBundle (void *buf, PINDEX len, PIPSocket::Address &addr, WORD &port, PString &iface, PINDEX &lastReadCount, const PTimeInterval &timeout) |
| | Read fram a remote address/port using the socket(s) available. More...
|
| |
| PBoolean | IsOpen () const |
| | Indicate if the socket(s) are open and ready for reads/writes. More...
|
| |
| WORD | GetPort () const |
| | Return the local port number being used by the socket(s) More...
|
| |
| void | SetNatMethod (PNatMethod *method) |
| | Set the NAT method, eg STUN client pointer. More...
|
| |
| PNatMethod * | GetNatMethod () const |
| |
| | PInterfaceMonitorClient (PINDEX priority=DefaultPriority) |
| |
| | ~PInterfaceMonitorClient () |
| |
| virtual PBoolean | GetInterfaceInfo (const PString &iface, InterfaceEntry &info) const |
| | Return information about an active interface given the descriptor string. More...
|
| |
| PINDEX | GetPriority () const |
| | Returns the priority of this client. More...
|
| |
| | PSafeObject (PSafeObject *indirectLock=NULL) |
| | Create a thread safe object. More...
|
| |
| PBoolean | SafeReference () |
| | Increment the reference count for object. More...
|
| |
| PBoolean | SafeDereference () |
| | Decrement the reference count for object. More...
|
| |
| PBoolean | LockReadOnly () const |
| | Lock the object for Read Only access. More...
|
| |
| void | UnlockReadOnly () const |
| | Release the read only lock on an object. More...
|
| |
| PBoolean | LockReadWrite () |
| | Lock the object for Read/Write access. More...
|
| |
| void | UnlockReadWrite () |
| | Release the read/write lock on an object. More...
|
| |
| void | SafeRemove () |
| | Set the removed flag. More...
|
| |
| PBoolean | SafelyCanBeDeleted () const |
| | Determine if the object can be safely deleted. More...
|
| |
| virtual bool | GarbageCollection () |
| | Do any garbage collection that may be required by the object so that it may be finally deleted. More...
|
| |
| virtual | ~PObject () |
| |
| virtual PObject * | Clone () const |
| | Create a copy of the class on the heap. More...
|
| |
| virtual PINDEX | HashFunction () const |
| | This function yields a hash value required by the PDictionary class. More...
|
| |
| virtual const char * | GetClass (unsigned ancestor=0) const |
| | Get the current dynamic type of the object instance. More...
|
| |
| PBoolean | IsClass (const char *cls) const |
| |
| virtual PBoolean | InternalIsDescendant (const char *clsName) const |
| | Determine if the dynamic type of the current instance is a descendent of the specified class. More...
|
| |
| virtual Comparison | Compare (const PObject &obj) const |
| | Compare the two objects and return their relative rank. More...
|
| |
| virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
| | Determine the byte wise comparison of two objects. More...
|
| |
| bool | operator== (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| bool | operator!= (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| bool | operator< (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| bool | operator> (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| bool | operator<= (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| bool | operator>= (const PObject &obj) const |
| | Compare the two objects. More...
|
| |
| virtual void | PrintOn (ostream &strm) const |
| | Output the contents of the object to the stream. More...
|
| |
| virtual void | ReadFrom (istream &strm) |
| | Input the contents of the object from the stream. More...
|
| |
|
| virtual void | OnAddInterface (const InterfaceEntry &entry) |
| | Call back function for when an interface has been added to the system. More...
|
| |
| virtual void | OnRemoveInterface (const InterfaceEntry &entry) |
| | Call back function for when an interface has been removed from the system. More...
|
| |
| bool | IsInterface (const PString &iface) const |
| |
| | PMonitoredSockets (bool reuseAddr, PNatMethod *natMethod) |
| |
| virtual void | OnRemoveNatMethod (const PNatMethod *natMethod) |
| | Called when a NAT method is about to be destroyed. More...
|
| |
| bool | CreateSocket (SocketInfo &info, const PIPSocket::Address &binding) |
| |
| bool | DestroySocket (SocketInfo &info) |
| |
| bool | GetSocketAddress (const SocketInfo &info, PIPSocket::Address &address, WORD &port, bool usingNAT) const |
| |
| PChannel::Errors | WriteToSocket (const void *buf, PINDEX len, const PIPSocket::Address &addr, WORD port, const SocketInfo &info, PINDEX &lastWriteCount) |
| |
| PChannel::Errors | ReadFromSocket (SocketInfo &info, void *buf, PINDEX len, PIPSocket::Address &addr, WORD &port, PINDEX &lastReadCount, const PTimeInterval &timeout) |
| |
| PChannel::Errors | ReadFromSocket (PSocket::SelectList &readers, PUDPSocket *&socket, void *buf, PINDEX len, PIPSocket::Address &addr, WORD &port, PINDEX &lastReadCount, const PTimeInterval &timeout) |
| |
| | PObject () |
| | Constructor for PObject, made protected so cannot ever create one on its own. More...
|
| |
This concrete class monitors a single scoket bound to a specific interface or address.
The interface name may be a partial descriptor such as "%eth0".