File: Poco.Net.MulticastSocket.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (129 lines) | stat: -rw-r--r-- 14,952 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::MulticastSocket</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class MulticastSocket</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> Sockets<br />
<b>Header:</b> Poco/Net/MulticastSocket.h</p>
<h2>Description</h2>
<div class="description">
<p>A <a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a> is a special <a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a> that can be used to send packets to and receive packets from multicast groups. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a></p>
<p><b>All Base Classes: </b><a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a>, <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.MulticastSocket.html#13954" title="Poco::Net::MulticastSocket::getInterface()">getInterface</a>, <a href="Poco.Net.MulticastSocket.html#13957" title="Poco::Net::MulticastSocket::getLoopback()">getLoopback</a>, <a href="Poco.Net.MulticastSocket.html#13960" title="Poco::Net::MulticastSocket::getTimeToLive()">getTimeToLive</a>, <a href="Poco.Net.MulticastSocket.html#13961" title="Poco::Net::MulticastSocket::joinGroup()">joinGroup</a>, <a href="Poco.Net.MulticastSocket.html#13966" title="Poco::Net::MulticastSocket::leaveGroup()">leaveGroup</a>, <a href="Poco.Net.MulticastSocket.html#13950" title="Poco::Net::MulticastSocket::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.MulticastSocket.html#13952" title="Poco::Net::MulticastSocket::setInterface()">setInterface</a>, <a href="Poco.Net.MulticastSocket.html#13955" title="Poco::Net::MulticastSocket::setLoopback()">setLoopback</a>, <a href="Poco.Net.MulticastSocket.html#13958" title="Poco::Net::MulticastSocket::setTimeToLive()">setTimeToLive</a></p>
<p><b>Inherited Functions: </b><a href="Poco.Net.Socket.html#15077" title="Poco::Net::Socket::address()">address</a>, <a href="Poco.Net.Socket.html#15000" title="Poco::Net::Socket::available()">available</a>, <a href="Poco.Net.DatagramSocket.html#12152" title="Poco::Net::DatagramSocket::bind()">bind</a>, <a href="Poco.Net.Socket.html#14991" title="Poco::Net::Socket::close()">close</a>, <a href="Poco.Net.DatagramSocket.html#12150" title="Poco::Net::DatagramSocket::connect()">connect</a>, <a href="Poco.Net.Socket.html#15076" title="Poco::Net::Socket::getBlocking()">getBlocking</a>, <a href="Poco.Net.DatagramSocket.html#12175" title="Poco::Net::DatagramSocket::getBroadcast()">getBroadcast</a>, <a href="Poco.Net.Socket.html#15064" title="Poco::Net::Socket::getKeepAlive()">getKeepAlive</a>, <a href="Poco.Net.Socket.html#15056" title="Poco::Net::Socket::getLinger()">getLinger</a>, <a href="Poco.Net.Socket.html#15061" title="Poco::Net::Socket::getNoDelay()">getNoDelay</a>, <a href="Poco.Net.Socket.html#15073" title="Poco::Net::Socket::getOOBInline()">getOOBInline</a>, <a href="Poco.Net.Socket.html#15033" title="Poco::Net::Socket::getOption()">getOption</a>, <a href="Poco.Net.Socket.html#15006" title="Poco::Net::Socket::getReceiveBufferSize()">getReceiveBufferSize</a>, <a href="Poco.Net.Socket.html#15012" title="Poco::Net::Socket::getReceiveTimeout()">getReceiveTimeout</a>, <a href="Poco.Net.Socket.html#15067" title="Poco::Net::Socket::getReuseAddress()">getReuseAddress</a>, <a href="Poco.Net.Socket.html#15070" title="Poco::Net::Socket::getReusePort()">getReusePort</a>, <a href="Poco.Net.Socket.html#15003" title="Poco::Net::Socket::getSendBufferSize()">getSendBufferSize</a>, <a href="Poco.Net.Socket.html#15009" title="Poco::Net::Socket::getSendTimeout()">getSendTimeout</a>, <a href="Poco.Net.Socket.html#15079" title="Poco::Net::Socket::impl()">impl</a>, <a href="Poco.Net.Socket.html#14981" title="Poco::Net::Socket::operator !=()">operator&nbsp;!=</a>, <a href="Poco.Net.Socket.html#14983" title="Poco::Net::Socket::operator <()">operator&nbsp;&lt;</a>, <a href="Poco.Net.Socket.html#14985" title="Poco::Net::Socket::operator <=()">operator&nbsp;&lt;=</a>, <a href="Poco.Net.DatagramSocket.html#12148" title="Poco::Net::DatagramSocket::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.Socket.html#14979" title="Poco::Net::Socket::operator ==()">operator&nbsp;==</a>, <a href="Poco.Net.Socket.html#14987" title="Poco::Net::Socket::operator >()">operator&nbsp;&gt;</a>, <a href="Poco.Net.Socket.html#14989" title="Poco::Net::Socket::operator >=()">operator&nbsp;&gt;=</a>, <a href="Poco.Net.Socket.html#15078" title="Poco::Net::Socket::peerAddress()">peerAddress</a>, <a href="Poco.Net.Socket.html#14997" title="Poco::Net::Socket::poll()">poll</a>, <a href="Poco.Net.DatagramSocket.html#12159" title="Poco::Net::DatagramSocket::receiveBytes()">receiveBytes</a>, <a href="Poco.Net.DatagramSocket.html#12168" title="Poco::Net::DatagramSocket::receiveFrom()">receiveFrom</a>, <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>, <a href="Poco.Net.DatagramSocket.html#12155" title="Poco::Net::DatagramSocket::sendBytes()">sendBytes</a>, <a href="Poco.Net.DatagramSocket.html#12163" title="Poco::Net::DatagramSocket::sendTo()">sendTo</a>, <a href="Poco.Net.Socket.html#15074" title="Poco::Net::Socket::setBlocking()">setBlocking</a>, <a href="Poco.Net.DatagramSocket.html#12173" title="Poco::Net::DatagramSocket::setBroadcast()">setBroadcast</a>, <a href="Poco.Net.Socket.html#15062" title="Poco::Net::Socket::setKeepAlive()">setKeepAlive</a>, <a href="Poco.Net.Socket.html#15053" title="Poco::Net::Socket::setLinger()">setLinger</a>, <a href="Poco.Net.Socket.html#15059" title="Poco::Net::Socket::setNoDelay()">setNoDelay</a>, <a href="Poco.Net.Socket.html#15071" title="Poco::Net::Socket::setOOBInline()">setOOBInline</a>, <a href="Poco.Net.Socket.html#15013" title="Poco::Net::Socket::setOption()">setOption</a>, <a href="Poco.Net.Socket.html#15004" title="Poco::Net::Socket::setReceiveBufferSize()">setReceiveBufferSize</a>, <a href="Poco.Net.Socket.html#15010" title="Poco::Net::Socket::setReceiveTimeout()">setReceiveTimeout</a>, <a href="Poco.Net.Socket.html#15065" title="Poco::Net::Socket::setReuseAddress()">setReuseAddress</a>, <a href="Poco.Net.Socket.html#15068" title="Poco::Net::Socket::setReusePort()">setReusePort</a>, <a href="Poco.Net.Socket.html#15001" title="Poco::Net::Socket::setSendBufferSize()">setSendBufferSize</a>, <a href="Poco.Net.Socket.html#15007" title="Poco::Net::Socket::setSendTimeout()">setSendTimeout</a>, <a href="Poco.Net.Socket.html#15084" title="Poco::Net::Socket::sockfd()">sockfd</a>, <a href="Poco.Net.Socket.html#15080" title="Poco::Net::Socket::supportsIPv4()">supportsIPv4</a>, <a href="Poco.Net.Socket.html#15081" title="Poco::Net::Socket::supportsIPv6()">supportsIPv6</a></p>
<h2>Constructors</h2>
<h3><a name="13941">MulticastSocket</a></h3>
<p class="decl"><a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>. </p>
</div>
<h3><a name="13942">MulticastSocket</a></h3>
<p class="decl">explicit <a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html#13594" title="enum  Poco::Net::IPAddress::Family">IPAddress::Family</a> family<br />);</p>
<div class="description">
<p>Creates an unconnected datagram socket. </p>
<p>The socket will be created for the given address family. </p>
</div>
<h3><a name="13947">MulticastSocket</a></h3>
<p class="decl"><a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a> with the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> from another socket. The <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> must be a <a href="Poco.Net.DatagramSocketImpl.html" title="class Poco::Net::DatagramSocketImpl">DatagramSocketImpl</a>, otherwise an <a href="Poco.InvalidArgumentException.html" title="class Poco::InvalidArgumentException">InvalidArgumentException</a> will be thrown. </p>
</div>
<h3><a name="13944">MulticastSocket</a></h3>
<p class="decl"><a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.SocketAddress.html" title="class Poco::Net::SocketAddress">SocketAddress</a> &amp; address,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool reuseAddress = false<br />);</p>
<div class="description">
<p>Creates a datagram socket and binds it to the given address. </p>
<p>Depending on the address family, the socket will be either an IPv4 or an IPv6 socket. </p>
</div>
<h2>Destructor</h2>
<h3><a name="13949">~MulticastSocket</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="13954">getInterface</a></h3>
<p class="decl"><a href="Poco.Net.NetworkInterface.html" title="class Poco::Net::NetworkInterface">NetworkInterface</a> getInterface() const;</p>
<div class="description">
<p>Returns the interface used for sending multicast packets. </p>
</div>
<h3><a name="13957">getLoopback</a></h3>
<p class="decl">bool getLoopback() const;</p>
<div class="description">
<p>Returns true if and only if loopback for multicast packets is enabled, false otherwise. </p>
</div>
<h3><a name="13960">getTimeToLive</a></h3>
<p class="decl">unsigned getTimeToLive() const;</p>
<div class="description">
<p>Returns the TTL/hop limit for outgoing packets. </p>
</div>
<h3><a name="13961">joinGroup</a></h3>
<p class="decl">void joinGroup(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; groupAddress<br />);</p>
<div class="description">
<p>Joins the specified multicast group at the default interface. </p>
</div>
<h3><a name="13963">joinGroup</a></h3>
<p class="decl">void joinGroup(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; groupAddress,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.NetworkInterface.html" title="class Poco::Net::NetworkInterface">NetworkInterface</a> &amp; interface<br />);</p>
<div class="description">
<p>Joins the specified multicast group at the given interface. </p>
</div>
<h3><a name="13966">leaveGroup</a></h3>
<p class="decl">void leaveGroup(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; groupAddress<br />);</p>
<div class="description">
<p>Leaves the specified multicast group at the default interface. </p>
</div>
<h3><a name="13968">leaveGroup</a></h3>
<p class="decl">void leaveGroup(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; groupAddress,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.NetworkInterface.html" title="class Poco::Net::NetworkInterface">NetworkInterface</a> &amp; interface<br />);</p>
<div class="description">
<p>Leaves the specified multicast group at the given interface. </p>
</div>
<h3><a name="13950">operator =</a></h3>
<p class="decl"><a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />);</p>
<div class="description">
<p>Assignment operator. </p>
<p>Releases the socket's <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> and attaches the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> from the other socket and increments the reference count of the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>.	 </p>
</div>
<h3><a name="13952">setInterface</a></h3>
<p class="decl">void setInterface(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.NetworkInterface.html" title="class Poco::Net::NetworkInterface">NetworkInterface</a> &amp; interface<br />);</p>
<div class="description">
<p>Sets the interface used for sending multicast packets. </p>
<p>To select the default interface, specify an empty interface. </p>
<p>This is done by setting the IP_MULTICAST_IF/IPV6_MULTICAST_IF socket option. </p>
</div>
<h3><a name="13955">setLoopback</a></h3>
<p class="decl">void setLoopback(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Enable or disable loopback for multicast packets. </p>
<p>Sets the value of the IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP socket option. </p>
</div>
<h3><a name="13958">setTimeToLive</a></h3>
<p class="decl">void setTimeToLive(<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned value<br />);</p>
<div class="description">
<p>Specifies the TTL/hop limit for outgoing packets. </p>
<p>Sets the value of the IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS socket option. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>