[Live-devel] Patch to allow derived class of GroupSock to hook on
AddDest() and RemoveDest
o.brunet at free.fr
o.brunet at free.fr
Sat Feb 11 10:44:51 PST 2006
Hi all,
The following small patch makes addDestination(), removeDestination() and
output() of GroupSock virtual, to allow the derived class to hook some special
handling (read: locking in a multithreadaed env) easily.
--- G:\Dev\C\live.2005.04.01\live\groupsock\include\Groupsock.hh Fri Apr 01
02:32:24 2005
+++ G:\Dev\C\live\groupsock\include\Groupsock.hh Sat Apr 02 23:17:44 2005
@@ -97,8 +97,8 @@
// As a special case, we also allow multiple destinations (addresses & ports)
// (This can be used to implement multi-unicast.)
- void addDestination(struct in_addr const& addr, Port const& port);
- void removeDestination(struct in_addr const& addr, Port const& port);
+ virtual void addDestination(struct in_addr const& addr, Port const& port);
+ virtual void removeDestination(struct in_addr const& addr, Port const& port);
void removeAllDestinations();
struct in_addr const& groupAddress() const {
@@ -116,7 +116,7 @@
void multicastSendOnly(); // send, but don't receive any multicast packets
- Boolean output(UsageEnvironment& env, u_int8_t ttl,
+ virtual Boolean output(UsageEnvironment& env, u_int8_t ttl,
unsigned char* buffer, unsigned bufferSize,
DirectedNetInterface* interfaceNotToFwdBackTo = NULL);
More information about the live-devel
mailing list