DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with sockets

Moving sockets applications to UnixWare 7 Release 7.2

Although UnixWare 7 Release 7.2 sockets and the BSD 4.3 sockets implementation are largely compatible, there are some differences an application programmer must be aware of before moving a BSD 4.3 sockets-based application to Release 7.2. These differences are described below:

Connection-mode primitives

BSD 4.3 Release 7.2
If connect is called on an unbound socket, the protocol determines whether or not the endpoint will be bound before the connection takes place When connect is called on an unbound socket, that socket is always bound to an address selected by the transport provider

Data transfer primitives

BSD 4.3 Release 7.2
If the MSG_PEEK flag has been set when sendmsg is called, and access rights are available, the access rights will be copied, leaving them available for reading by a subsequent call to recvmsg If the MSG_PEEK flag is specified in a call to recvmsg, and access rights are available, the access rights will be transferred to the user buffer associated with the receiving socket. They are then destroyed, and the transferring socket has no further access to them. They are therefore unavailable to a subsequent call to recvmsg. Any data associated with the access rights will also be copied to the user buffer and will not be available to recvmsg

Information primitives

BSD 4.3 Release 7.2
The SIOCSPGRP and FIOSETOWN commands for the ioctl(2) system call and the F_SETOWN command for the fcntl(2) system call take as arguments a positive process id or a negative process group id that identifies the intended recipient list of subsequent SIGURG and SIGIO signals The only acceptable arguments to ioctl(2) and fcntl(2) are the caller's process id or a negative process group id which has the same absolute value as the caller's process id. In other words, the calling process is the only recipient of SIGURG and SIGIO signals

Local management

BSD 4.3 Release 7.2
setsockopt can be used at any time during the life of a socket. Because of the state diagram specified by the Transport Provider Interface (TPI), a setsockopt operation on a transport provider conforming to this specification will fail if issued on a socket that is not bound to a local address. Specifically, if a socket is unbound and setsockopt is used, then the operation will succeed in the AF_INET domain, but will fail in the AF_UNIX domain

Signals

BSD 4.3 Release 7.2
SIGIO is delivered every time new data is appended to the socket input queue SIGIO is delivered only when data is appended to a socket queue that was previously empty
A SIGURG is delivered every time new data is anticipated or actually arrives A SUGURG is delivered only when there is no urgent data already pending

Miscellaneous

BSD 4.3 Release 7.2
If ls -l is executed on a directory that contains a UNIX domain socket, an ``s'' will be printed on the left side of the mode field If ls -l is executed on a directory that contains a UNIX domain socket, a ``p'' will be printed on the left side of the mode field
Executing ls -F will cause an equals sign (=) to be printed after any filename that represents a UNIX domain socket Nothing will be printed after a filename that represents a UNIX domain socket


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004