summaryrefslogtreecommitdiff
path: root/src/SocketCore.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-20 14:23:25 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-20 14:23:25 +0000
commit9281f1126471fa90e2d6fe094c4c6eba00073ea6 (patch)
treedb2dc360e785cf78fd67f565d061cc24dc68f388 /src/SocketCore.h
parentaee471e52c6f7ac06817600e2c21b400ef375ecb (diff)
2010-02-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Local Peer Discovery. It is disabled by default. Use --bt-enable-lpd to enable the function. * src/BtConstants.h * src/BtSetup.cc * src/LpdDispatchMessageCommand.cc * src/LpdDispatchMessageCommand.h * src/LpdMessage.h * src/LpdMessageDispatcher.cc * src/LpdMessageDispatcher.h * src/LpdMessageReceiver.cc * src/LpdMessageReceiver.h * src/LpdReceiveMessageCommand.cc * src/LpdReceiveMessageCommand.h * src/Makefile.am * src/OptionHandlerFactory.cc * src/Peer.cc * src/Peer.h * src/PeerInteractionCommand.cc * src/SocketCore.cc * src/SocketCore.h * src/prefs.cc * src/prefs.h * src/usage_text.h * src/util.cc * src/util.h * test/LpdMessageDispatcherTest.cc * test/LpdMessageReceiverTest.cc * test/Makefile.am
Diffstat (limited to 'src/SocketCore.h')
-rw-r--r--src/SocketCore.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h
index df69e41d..b4b2714c 100644
--- a/src/SocketCore.h
+++ b/src/SocketCore.h
@@ -135,6 +135,8 @@ private:
#endif // HAVE_EPOLL
+ void setSockOpt(int level, int optname, void* optval, socklen_t optlen);
+
SocketCore(sock_t sockfd, int sockType);
public:
SocketCore(int sockType = SOCK_STREAM);
@@ -144,6 +146,12 @@ public:
bool isOpen() const { return sockfd != (sock_t) -1; }
+ void setMulticastTtl(unsigned char ttl);
+
+ void joinMulticastGroup(const std::string& ipaddr, uint16_t port);
+
+ void bindWithFamily(uint16_t port, int family, int flags = AI_PASSIVE);
+
/**
* Creates a socket and bind it with locahost's address and port.
* flags is set to struct addrinfo's ai_flags.