POpenSkt
POpenSkt Add a socket and listener to the socket table MPPPBPtr thePBptr; pointer to an DDPparms structure Boolean async; 0=await completion; 1=immediate return POpenSkt adds a socket and its socket listener to the socket table thePBptr iis a pointer to an DDPparms structure. Æ csCode short 2 26 always openSkt
´ socket char 1 28 socket number Æ listener Ptr 4 30 socket listener 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
Notes: If the socket parameter is nozero, it must be in the range 64 to 127, and it specifies the socket's number; if socket is 0, POpenSkt opens a socket with a socket number in the range 128 to 254, and returns it in the socket
parameter. listener contains a pointer to the socket listener.
POpenSkt will return ddpSktErr if you pass the number of an already opened socket, if you pass a socket number greater than 127, or if the
socket table is full (the socket table can hold a maximum of 12 sockets).
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.