File: dgramsocket.tex

package info (click to toggle)
wxwidgets2.8 2.8.10.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 239,052 kB
  • ctags: 289,550
  • sloc: cpp: 1,838,857; xml: 396,717; python: 282,506; ansic: 126,171; makefile: 51,406; sh: 14,581; asm: 299; sql: 258; lex: 194; perl: 139; yacc: 128; pascal: 95; php: 39; lisp: 38; tcl: 24; haskell: 20; java: 18; cs: 18; erlang: 17; ruby: 16; ada: 9; ml: 9; csh: 9
file content (116 lines) | stat: -rw-r--r-- 3,585 bytes parent folder | download | duplicates (3)
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name:        dgramsocket.tex
%% Purpose:     wxSocket docs
%% Author:      Angel Vidal Veiga (kry@amule.org)
%% Modified by:
%% Created:     2006
%% RCS-ID:      $Id: dgramsocket.tex 41905 2006-10-10 17:46:49Z JS $
%% Copyright:   (c) wxWidgets team
%% License:     wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ---------------------------------------------------------------------------
% CLASS wxDatagramSocket
% ---------------------------------------------------------------------------

\section{\class{wxDatagramSocket}}\label{wxdatagramsocket}

\wxheading{Derived from}

\helpref{wxSocketBase}{wxsocketbase}

\wxheading{Include files}

<wx/socket.h>

\latexignore{\rtfignore{\wxheading{Members}}}

% ---------------------------------------------------------------------------
% Members
% ---------------------------------------------------------------------------
%
% wxDatagramSocket
%
\membersection{wxDatagramSocket::wxDatagramSocket}\label{wxdatagramsocketctor}

\func{}{wxDatagramSocket}{\param{wxSocketFlags}{ flags = wxSOCKET\_NONE}}

Constructor.

\wxheading{Parameters}

\docparam{flags}{Socket flags (See \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags})}

%
% ~wxDatagramSocket
%
\membersection{wxDatagramSocket::\destruct{wxDatagramSocket}}\label{wxdatagramsocketdtor}

\func{}{\destruct{wxDatagramSocket}}{\void}

Destructor. Please see \helpref{wxSocketBase::Destroy}{wxsocketbasedestroy}.

%
% ReceiveFrom
%
\membersection{wxDatagramSocket::ReceiveFrom}\label{wxdatagramsocketreceivefrom}

\func{wxDatagramSocket\&}{ReceiveFrom}{\param{wxSockAddress\&}{ address}, \param{void *}{ buffer}, \param{wxUint32}{ nbytes}}

This function reads a buffer of {\it nbytes} bytes from the socket.

Use \helpref{LastCount}{wxsocketbaselastcount} to verify the number of bytes actually read.

Use \helpref{Error}{wxsocketbaseerror} to determine if the operation succeeded.

\wxheading{Parameters}

\docparam{address}{Any address - will be overwritten with the address of the peer that sent that data.}

\docparam{buffer}{Buffer where to put read data.}

\docparam{nbytes}{Number of bytes.}

\wxheading{Return value}

Returns a reference to the current object, and the address of the peer that sent the data on address param.

\wxheading{See also}

\helpref{wxSocketBase::Error}{wxsocketbaseerror}, 
\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}, 
\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}, 
\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags},

%
% SendTo
%
\membersection{wxDatagramSocket::SendTo}\label{wxdatagramsocketsendto}

\func{wxDatagramSocket\&}{SendTo}{\param{const wxSockAddress\&}{ address}, \param{const void *}{ buffer}, \param{wxUint32}{ nbytes}}

This function writes a buffer of {\it nbytes} bytes to the socket.

Use \helpref{LastCount}{wxsocketbaselastcount} to verify the number of bytes actually wrote.

Use \helpref{Error}{wxsocketbaseerror} to determine if the operation succeeded.

\wxheading{Parameters}

\docparam{address}{The address of the destination peer for this data.}

\docparam{buffer}{Buffer where read data is.}

\docparam{nbytes}{Number of bytes.}

\wxheading{Return value}

Returns a reference to the current object.

\wxheading{See also}

\helpref{wxSocketBase::Error}{wxsocketbaseerror}, 
\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}, 
\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}, 
\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}