This topic helps you use Xsocket on an integrated client.
- At a command line, add the library in which the
Xsockets tool exists to your library lists by issuing this command:
ADDLIBLE <library-name>
where the <library-name>
is the name of the library you created during integrated Xsockets configuration.
For example, if the name of the library is MYXSOCKET, then enter: ADDLIBLE MYXSOCKET
- On a command line interface, enter:
CALL TSOXSOCK
- From the Xsocket window that displays, you can
access all socket routines through its menu bar and selection field. This
window always displays after you choose a socket function. You can use this
interface to select socket programs that already exist. To work with a new
socket, follow these steps:
- In the list of socket functions, select socket and
press Enter.
- In the socket() prompt window
that displays, select the appropriate Address Family, Socket Type, and Protocol
for the socket, and press Enter.
- Select Descriptor and select Select
descriptor.
Note: If other socket descriptors already
exist, this displays a list of active socket descriptors.
- From the list that displays, select the socket descriptor that
you created.
Note: If other socket descriptors exist,
the tool automatically applies a socket function to the latest socket descriptor.
- From the list of socket functions, select a socket
function with which you want to work, whatever socket descriptor you chose
in step 3c is used on that socket function. As soon as you select a socket
function, a series of windows display where you can provide specific information
about the socket function. For example, if you select connect(),
you need to provide the address length, address family, and address data in
the resulting windows. The socket function chosen is then called with this
information that you provided. Any errors that occur on a socket function
are displayed back to the user as an errno.
Notes: - The Xsockets tool uses the graphical look support for DDS. Thus, how data
is entered and how selections are made from the windows/panels you see depend
on whether you are using a graphical display station or a nongraphical display
station. For example, on a graphical display station, you can see the selection
field for the socket functions as a check box; otherwise, you might see a
single field.
- Be aware that there are ioctl() requests that are available
on a socket which have not been implemented in the tool.