-
Notifications
You must be signed in to change notification settings - Fork 0
/
DatagramSocket_8h.xml
104 lines (104 loc) · 14.7 KB
/
DatagramSocket_8h.xml
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
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.6" xml:lang="en-US">
<compounddef id="DatagramSocket_8h" kind="file" language="C++">
<compoundname>DatagramSocket.h</compoundname>
<includes refid="AbstractSocket_8h" local="no">AbstractSocket.h</includes>
<incdepgraph>
<node id="2">
<label>AbstractSocket.h</label>
<link refid="AbstractSocket_8h"/>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="8" relation="include">
</childnode>
</node>
<node id="1">
<label>DatagramSocket.h</label>
<link refid="DatagramSocket_8h"/>
<childnode refid="2" relation="include">
</childnode>
</node>
<node id="3">
<label>DataIO.h</label>
<link refid="DataIO_8h"/>
<childnode refid="4" relation="include">
</childnode>
</node>
<node id="4">
<label>SupportDefs.h</label>
<link refid="SupportDefs_8h"/>
<childnode refid="5" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="7" relation="include">
</childnode>
</node>
<node id="5">
<label>BeBuild.h</label>
</node>
<node id="6">
<label>inttypes.h</label>
</node>
<node id="8">
<label>sys/socket.h</label>
</node>
<node id="7">
<label>sys/types.h</label>
</node>
</incdepgraph>
<innerclass refid="classBDatagramSocket" prot="public">BDatagramSocket</innerclass>
<briefdescription>
<para><ref refid="classBAbstractSocket" kindref="compound">BAbstractSocket</ref> implementation for datagram connections. </para>
</briefdescription>
<detaileddescription>
</detaileddescription>
<programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>2011,<sp/>Haiku,<sp/>Inc.<sp/>All<sp/>Rights<sp/>Reserved.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>Distributed<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>MIT<sp/>License.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>_DATAGRAM_SOCKET_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_DATAGRAM_SOCKET_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="AbstractSocket_8h" kindref="compound">AbstractSocket.h</ref>></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight></codeline>
<codeline lineno="12" refid="classBDatagramSocket" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classBDatagramSocket" kindref="compound">BDatagramSocket</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classBAbstractSocket" kindref="compound">BAbstractSocket</ref><sp/>{</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="14" refid="classBDatagramSocket_1aff103fc27ec7e5e6c297834f51c22647" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1aff103fc27ec7e5e6c297834f51c22647" kindref="member">BDatagramSocket</ref>();</highlight></codeline>
<codeline lineno="15" refid="classBDatagramSocket_1a4b0de32f12b5b4792351891c1efad563" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a4b0de32f12b5b4792351891c1efad563" kindref="member">BDatagramSocket</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BNetworkAddress&<sp/>peer,</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="SupportDefs_8h_1a29bb8e432e460af113ef8938cef96f8b" kindref="member">bigtime_t</ref><sp/>timeout<sp/>=<sp/>-1);</highlight></codeline>
<codeline lineno="17" refid="classBDatagramSocket_1a79ca47cd67f20130dd371cfdf80028ee" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a79ca47cd67f20130dd371cfdf80028ee" kindref="member">BDatagramSocket</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classBDatagramSocket" kindref="compound">BDatagramSocket</ref>&<sp/>other);</highlight></codeline>
<codeline lineno="18" refid="classBDatagramSocket_1acd83cd922179997e11eeea350595abc3" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1acd83cd922179997e11eeea350595abc3" kindref="member">~BDatagramSocket</ref>();</highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><ref refid="SupportDefs_8h_1ab6735558965995709a53691ae913c81b" kindref="member">status_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Bind(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BNetworkAddress&<sp/>peer,</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>reuseAddr<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><ref refid="SupportDefs_8h_1ab6735558965995709a53691ae913c81b" kindref="member">status_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Connect(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BNetworkAddress&<sp/>peer,</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="SupportDefs_8h_1a29bb8e432e460af113ef8938cef96f8b" kindref="member">bigtime_t</ref><sp/>timeout<sp/>=<sp/>B_INFINITE_TIMEOUT);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/><ref refid="SupportDefs_8h_1ab6735558965995709a53691ae913c81b" kindref="member">status_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Accept(<ref refid="classBAbstractSocket" kindref="compound">BAbstractSocket</ref>*&<sp/>_socket);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="27" refid="classBDatagramSocket_1a66af2ddaeda1631dd384e1c677c3233a" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="SupportDefs_8h_1ab6735558965995709a53691ae913c81b" kindref="member">status_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a66af2ddaeda1631dd384e1c677c3233a" kindref="member">SetBroadcast</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>broadcast);</highlight></codeline>
<codeline lineno="28" refid="classBDatagramSocket_1a9ffccacba93217a50f57772c7c9f755f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a9ffccacba93217a50f57772c7c9f755f" kindref="member">SetPeer</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BNetworkAddress&<sp/>peer);</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30" refid="classBDatagramSocket_1a14121c4a20ea7583b5b29bcef28aeb26" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a14121c4a20ea7583b5b29bcef28aeb26" kindref="member">MaxTransmissionSize</ref>()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight></codeline>
<codeline lineno="32" refid="classBDatagramSocket_1abbab81c244f9e6fe3078e960750a13c7" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/>ssize_t<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1abbab81c244f9e6fe3078e960750a13c7" kindref="member">SendTo</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BNetworkAddress&<sp/>address,</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>buffer,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>size);</highlight></codeline>
<codeline lineno="34" refid="classBDatagramSocket_1ab63539aacc97082f7e036f135354ea96" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/>ssize_t<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1ab63539aacc97082f7e036f135354ea96" kindref="member">ReceiveFrom</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>buffer,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>bufferSize,</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BNetworkAddress&<sp/>from);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>BDataIO<sp/>implementation</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39" refid="classBDatagramSocket_1ac8d954e7e11eb2ef59d55b80a89e286c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/>ssize_t<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1ac8d954e7e11eb2ef59d55b80a89e286c" kindref="member">Read</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>buffer,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>size);</highlight></codeline>
<codeline lineno="40" refid="classBDatagramSocket_1a166e043d7e578825b4b36f069309d1df" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/>ssize_t<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classBDatagramSocket_1a166e043d7e578825b4b36f069309d1df" kindref="member">Write</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>buffer,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>size);</highlight></codeline>
<codeline lineno="41"><highlight class="normal">};</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/></highlight><highlight class="comment">//<sp/>_DATAGRAM_SOCKET_H</highlight><highlight class="normal"></highlight></codeline>
</programlisting>
<location file="/boot/home/src/haiku/headers/os/net/DatagramSocket.h"/>
</compounddef>
</doxygen>