#include <servicedirectory.hh>
Service directories can query and advertise services which are registered locally, or remotely, via UDP broadcast or point-to-point TCP messages. A service is identified by human readable title and description, a list of type strings, and a URL.
Definition at line 62 of file servicedirectory.hh.
|
Constructor.
Definition at line 156 of file servicedirectory.cc. |
|
Constructor. Uses default options * LISTEN_BCAST|RELAY_TCP_TO_BCAST|RELAY_BCAST_TO_TCP Definition at line 172 of file servicedirectory.cc. |
|
Destructor: all open sockets are shut down.
Definition at line 212 of file servicedirectory.cc. |
|
Also relay queries via TCP to service directory running at the given host and port. Use with listenTCP() to span networks. Definition at line 570 of file servicedirectory.cc. |
|
Add service to directory.
Definition at line 504 of file servicedirectory.cc. |
|
End query with identifier q.
Definition at line 286 of file servicedirectory.cc. |
|
Get incoming tcp file descriptors.
Definition at line 615 of file servicedirectory.cc. |
|
Get outgoing tcp remote relay file descriptors.
Definition at line 604 of file servicedirectory.cc. |
|
Get TCP socket file descriptor (listening).
Definition at line 160 of file servicedirectory.hh. |
|
Get UDP socket file descriptor.
Definition at line 157 of file servicedirectory.hh. |
|
Check UDP and TCP sockets (via a call to select), and handle incoming queries and advertisements from remote directories. This method must be called periodically in order to maintain an active directory.
Definition at line 291 of file servicedirectory.cc. |
|
Listen on a TCP port for messages, which will be responded to in handleIncoming().
If you passed ServiceDirectory::LISTEN_TCP to the constructor, then calling this is unnecessary. You can only listen on one TCP port. Definition at line 550 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Listen on a UDP port for messages, which will be responded to in handleIncoming().
You can only listen on one UDP port. Definition at line 185 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Start a query on both this directory and remote directories for services which match the given patterns. The listener is notified when a matching service is found. If any remote relays have been added, the query will also be sent to each one (see addRelay())
Definition at line 230 of file servicedirectory.cc. |
|
Cause handleIncoming() to also relay incomming TCP messages broadcast to local network (or stop relaying if argument is false). (Only useful if listenTCP() has been called or ServiceDirectory::LISTEN_TCP was passed to the constructor. Calling this is the same as passing ServiceDirectory::RELAY_TCP_TO_BCAST|ServiceDirectory::LISTEN_TCP to the constructor.) Definition at line 210 of file servicedirectory.hh. |
|
Don't relay queries to the specified directory.
Definition at line 594 of file servicedirectory.cc. Referenced by addService(), handleIncoming(), and query(). |
|
Remove service from directory.
Definition at line 545 of file servicedirectory.cc. |
|
Listen on local subnet UDP broadcast.
Definition at line 149 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Listen on TCP port 4229.
Definition at line 150 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Relay from local broadcast to remote TCP relay points.
Definition at line 152 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Relay from TCP ports to local broadcast.
Definition at line 151 of file servicedirectory.cc. Referenced by ServiceDirectory(). |
|
Relay from incoming TCP ports to remote relay points (see addRelay).
Definition at line 153 of file servicedirectory.cc. Referenced by ServiceDirectory(). |