#include <dolphin/ip.h>
s32 UDPOpen ( UDPInfo* info, void* heap, s32 heapLen );
UDPOpen() creates an endpoint for UDP communication. Connection
to the other end is created with a UDPConnect()
call. Once connected, data may be transferred using
UDPSendAsync() and
UDPReceiveAsync(). When a session has
been completed, UDPClose() should be
performed.
When a UDP datagram arrives and if the application program has not called
UDPReceiveAsync(), the datagram
will be saved in the default receive buffer specified with [heap,
heap + heapLen).
If the datagram is too big to save in the default receive buffer, the datagram is simply discarded.
info |
Pointer to UDPInfo to initialize. |
heap |
The pointer to the default receive buffer. |
heapLen |
The size of the heap in bytes. |
IP_ERR_NONE |
Succeeded. |
IP_ERR_EXIST |
Specified info is already in use. |
IP_ERR_INVALID |
info is NULL. |