]>
Commit | Line | Data |
---|---|---|
033ab32e AVV |
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
2 | %% Name: dgramsocket.tex | |
3 | %% Purpose: wxSocket docs | |
4 | %% Author: Angel Vidal Veiga (kry@amule.org) | |
5 | %% Modified by: | |
6 | %% Created: 2006 | |
7 | %% RCS-ID: $Id$ | |
8 | %% Copyright: (c) wxWidgets team | |
9 | %% License: wxWindows license | |
10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 | ||
12 | % --------------------------------------------------------------------------- | |
13 | % CLASS wxDatagramSocket | |
14 | % --------------------------------------------------------------------------- | |
15 | ||
16 | \section{\class{wxDatagramSocket}}\label{wxdatagramsocket} | |
17 | ||
18 | \wxheading{Derived from} | |
19 | ||
20 | \helpref{wxSocketBase}{wxsocketbase} | |
21 | ||
22 | \wxheading{Include files} | |
23 | ||
24 | <wx/socket.h> | |
25 | ||
a7af285d VZ |
26 | \wxheading{Library} |
27 | ||
28 | \helpref{wxNet}{librarieslist} | |
29 | ||
033ab32e AVV |
30 | \latexignore{\rtfignore{\wxheading{Members}}} |
31 | ||
32 | % --------------------------------------------------------------------------- | |
33 | % Members | |
34 | % --------------------------------------------------------------------------- | |
35 | % | |
36 | % wxDatagramSocket | |
37 | % | |
38 | \membersection{wxDatagramSocket::wxDatagramSocket}\label{wxdatagramsocketctor} | |
39 | ||
40 | \func{}{wxDatagramSocket}{\param{wxSocketFlags}{ flags = wxSOCKET\_NONE}} | |
41 | ||
42 | Constructor. | |
43 | ||
44 | \wxheading{Parameters} | |
45 | ||
46 | \docparam{flags}{Socket flags (See \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags})} | |
47 | ||
48 | % | |
49 | % ~wxDatagramSocket | |
50 | % | |
51 | \membersection{wxDatagramSocket::\destruct{wxDatagramSocket}}\label{wxdatagramsocketdtor} | |
52 | ||
53 | \func{}{\destruct{wxDatagramSocket}}{\void} | |
54 | ||
55 | Destructor. Please see \helpref{wxSocketBase::Destroy}{wxsocketbasedestroy}. | |
56 | ||
033ab32e AVV |
57 | % |
58 | % ReceiveFrom | |
59 | % | |
60 | \membersection{wxDatagramSocket::ReceiveFrom}\label{wxdatagramsocketreceivefrom} | |
61 | ||
62 | \func{wxDatagramSocket\&}{ReceiveFrom}{\param{wxSockAddress\&}{ address}, \param{void *}{ buffer}, \param{wxUint32}{ nbytes}} | |
63 | ||
64 | This function reads a buffer of {\it nbytes} bytes from the socket. | |
65 | ||
66 | Use \helpref{LastCount}{wxsocketbaselastcount} to verify the number of bytes actually read. | |
67 | ||
68 | Use \helpref{Error}{wxsocketbaseerror} to determine if the operation succeeded. | |
69 | ||
70 | \wxheading{Parameters} | |
71 | ||
72 | \docparam{address}{Any address - will be overwritten with the address of the peer that sent that data.} | |
73 | ||
74 | \docparam{buffer}{Buffer where to put read data.} | |
75 | ||
76 | \docparam{nbytes}{Number of bytes.} | |
77 | ||
78 | \wxheading{Return value} | |
79 | ||
80 | Returns a reference to the current object, and the address of the peer that sent the data on address param. | |
81 | ||
033ab32e AVV |
82 | \wxheading{See also} |
83 | ||
84 | \helpref{wxSocketBase::Error}{wxsocketbaseerror}, | |
85 | \helpref{wxSocketBase::LastError}{wxsocketbaselasterror}, | |
86 | \helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}, | |
87 | \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}, | |
033ab32e AVV |
88 | |
89 | % | |
90 | % SendTo | |
91 | % | |
92 | \membersection{wxDatagramSocket::SendTo}\label{wxdatagramsocketsendto} | |
93 | ||
94 | \func{wxDatagramSocket\&}{SendTo}{\param{const wxSockAddress\&}{ address}, \param{const void *}{ buffer}, \param{wxUint32}{ nbytes}} | |
95 | ||
96 | This function writes a buffer of {\it nbytes} bytes to the socket. | |
97 | ||
98 | Use \helpref{LastCount}{wxsocketbaselastcount} to verify the number of bytes actually wrote. | |
99 | ||
100 | Use \helpref{Error}{wxsocketbaseerror} to determine if the operation succeeded. | |
101 | ||
102 | \wxheading{Parameters} | |
103 | ||
104 | \docparam{address}{The address of the destination peer for this data.} | |
105 | ||
106 | \docparam{buffer}{Buffer where read data is.} | |
107 | ||
108 | \docparam{nbytes}{Number of bytes.} | |
109 | ||
110 | \wxheading{Return value} | |
111 | ||
112 | Returns a reference to the current object. | |
113 | ||
033ab32e AVV |
114 | \wxheading{See also} |
115 | ||
116 | \helpref{wxSocketBase::Error}{wxsocketbaseerror}, | |
117 | \helpref{wxSocketBase::LastError}{wxsocketbaselasterror}, | |
118 | \helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}, | |
119 | \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags} | |
b67a86d5 | 120 |