PWriteDDP
PWriteDDP Send a datagram to another socket
#include <AppleTalk.h> AppleTalk Manager
OSErr PWriteDDP( thePBptr, async);
MPPPBPtr thePBptr; pointer to an DDPparms structure
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PWriteDDP sends a datagram to another socket.
thePBptr iis a pointer to an DDPparms structure.
Out-In Name Type Size Offset Description
Æ csCode short 2 26 always closeSkt
Æ socket char 1 28 socket number
Æ checksumFlag char 1 29 checksum flag
Æ wdsPointer Ptr 4 30 write data structure
async is a Boolean value. Use FALSE for normal ( synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
ddpSktErr (-91) Socket Error
ddpLenErr (-92) Datagram length too big
noBridgeErr (-93) No bridge found

Notes: wdsPointer points to a write data structure containing the datagram and the
address of the destination socket. If the checksumFlag is TRUE,
PWriteDDP will compute the checksum for all datagrams requiring long
headers.
Before it can use a socket, the program must call POpenSkt which adds a
socket and its socket listener to the socket table. When a client is finished
using a socket, call PCloseSkt, which removes the socket's entry from the
socket table. To send a datagram via DDP, call PWriteDDP. If you want to
read DDP datagrams, you must write your own socket listener. DDP will
send every incoming datagram for that socket to your socket listener.