1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: dgramsocket.tex
3 %% Purpose: wxSocket docs
4 %% Author: Angel Vidal Veiga (kry@amule.org)
8 %% Copyright: (c) wxWidgets team
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 % ---------------------------------------------------------------------------
13 % CLASS wxDatagramSocket
14 % ---------------------------------------------------------------------------
16 \section{\class{wxDatagramSocket
}}\label{wxdatagramsocket
}
18 \wxheading{Derived from
}
20 \helpref{wxSocketBase
}{wxsocketbase
}\\
21 \helpref{wxObject
}{wxobject
}
23 \wxheading{Include files
}
29 \helpref{wxNet
}{librarieslist
}
31 \latexignore{\rtfignore{\wxheading{Members
}}}
33 % ---------------------------------------------------------------------------
35 % ---------------------------------------------------------------------------
39 \membersection{wxDatagramSocket::wxDatagramSocket
}\label{wxdatagramsocketctor
}
41 \func{}{wxDatagramSocket
}{\param{wxSocketFlags
}{ flags = wxSOCKET
\_NONE}}
45 \wxheading{Parameters
}
47 \docparam{flags
}{Socket flags (See
\helpref{wxSocketBase::SetFlags
}{wxsocketbasesetflags
})
}
52 \membersection{wxDatagramSocket::
\destruct{wxDatagramSocket
}}\label{wxdatagramsocketdtor
}
54 \func{}{\destruct{wxDatagramSocket
}}{\void}
56 Destructor. Please see
\helpref{wxSocketBase::Destroy
}{wxsocketbasedestroy
}.
61 \membersection{wxDatagramSocket::ReceiveFrom
}\label{wxdatagramsocketreceivefrom
}
63 \func{wxDatagramSocket\&
}{ReceiveFrom
}{\param{wxSockAddress\&
}{ address
},
\param{void *
}{ buffer
},
\param{wxUint32
}{ nbytes
}}
65 This function reads a buffer of
{\it nbytes
} bytes from the socket.
67 Use
\helpref{LastCount
}{wxsocketbaselastcount
} to verify the number of bytes actually read.
69 Use
\helpref{Error
}{wxsocketbaseerror
} to determine if the operation succeeded.
71 \wxheading{Parameters
}
73 \docparam{address
}{Any address - will be overwritten with the address of the peer that sent that data.
}
75 \docparam{buffer
}{Buffer where to put read data.
}
77 \docparam{nbytes
}{Number of bytes.
}
79 \wxheading{Return value
}
81 Returns a reference to the current object, and the address of the peer that sent the data on address param.
85 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
},
86 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
},
87 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
},
88 \helpref{wxSocketBase::SetFlags
}{wxsocketbasesetflags
},
93 \membersection{wxDatagramSocket::SendTo
}\label{wxdatagramsocketsendto
}
95 \func{wxDatagramSocket\&
}{SendTo
}{\param{const wxSockAddress\&
}{ address
},
\param{const void *
}{ buffer
},
\param{wxUint32
}{ nbytes
}}
97 This function writes a buffer of
{\it nbytes
} bytes to the socket.
99 Use
\helpref{LastCount
}{wxsocketbaselastcount
} to verify the number of bytes actually wrote.
101 Use
\helpref{Error
}{wxsocketbaseerror
} to determine if the operation succeeded.
103 \wxheading{Parameters
}
105 \docparam{address
}{The address of the destination peer for this data.
}
107 \docparam{buffer
}{Buffer where read data is.
}
109 \docparam{nbytes
}{Number of bytes.
}
111 \wxheading{Return value
}
113 Returns a reference to the current object.
117 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
},
118 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
},
119 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
},
120 \helpref{wxSocketBase::SetFlags
}{wxsocketbasesetflags
}