PWriteDDP
MPPPBPtr thePBptr; pointer to an DDPparms structure Boolean async; 0=await completion; 1=immediate return PWriteDDP sends a datagram to another socket. thePBptr iis a pointer to an DDPparms structure. Æ 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.
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.