Methods of Class DatagramSocket
- DatagramSocket
- DatagramSocket(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Creates a datagram socket.
- Parameters
Type |
is sock_dgram by default.
|
- recvFrom
- sal_Int32 recvFrom(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Tries to receives BufferSize data from the socket, if no error occurs.
- Parameters
pSenderAddr |
You must provide pointer to a SocketAddr.
It will be filled with the address of the datagrams sender.
If pSenderAddr is 0, it is ignored.
|
pBuffer |
Points to a buffer that will be filled with the received
datagram.
|
BufferSize |
The size of pBuffer.
|
Flag |
Modifier for the call. Valid values are:
osl_Socket_MsgNormal
osl_Socket_MsgOOB
osl_Socket_MsgPeek
osl_Socket_MsgDontRoute
osl_Socket_MsgMaxIOVLen
|
- Return
- the number of received bytes.
- sendTo
- sal_Int32 sendTo(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Description
- Tries to send one datagram with BytesToSend size to the given ReceiverAddr.
Since there is only send one packet, the function doesn't care about
packet boundaries.
- Parameters
ReceiverAddr |
A SocketAddr that contains
the destination address for this send.
|
pBuffer |
Points to a buffer that contains the send-data.
|
BufferSize |
The number of bytes to send. pBuffer must have at least
this size.
|
Flag |
Modifier for the call. Valid values are:
osl_Socket_MsgNormal
osl_Socket_MsgOOB
osl_Socket_MsgPeek
osl_Socket_MsgDontRoute
osl_Socket_MsgMaxIOVLen
|
- Return
- the number of transfered bytes.
Top of Page
Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.