JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Programming Interfaces Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information


1.  Memory and CPU Management

2.  Session Description Protocol API

3.  Process Scheduler

4.  Locality Group APIs

5.  Input/Output Interfaces

6.  Interprocess Communication

7.  Socket Interfaces

8.  Programming With XTI and TLI

What Are XTI and TLI?

XTI/TLI Read/Write Interface

Write Data

Read Data

Close Connection

Advanced XTI/TLI Topics

Asynchronous Execution Mode

Advanced XTI/TLI Programming Example

Asynchronous Networking

Networking Programming Models

Asynchronous Connectionless-Mode Service

Making the Endpoint Asynchronous

Asynchronous Network Transfers

Asynchronous Connection-Mode Service

Asynchronously Establishing a Connection

Asynchronous Use of a Connection

Asynchronous Open

Transferring a File Descriptor

State Transitions

XTI/TLI States

Outgoing Events

Incoming Events

State Tables

Guidelines to Protocol Independence

XTI/TLI Versus Socket Interfaces

Socket-to-XTI/TLI Equivalents

Additions to the XTI Interface

9.  Packet Filtering Hooks

10.  Transport Selection and Name-to-Address Mapping

11.  Real-time Programming and Administration

12.  The Oracle Solaris ABI and ABI Tools

A.  UNIX Domain Sockets


Socket-to-XTI/TLI Equivalents

The following table shows approximate equivalents between XTI/TLI interfaces and socket interfaces. The comment field describes the differences. If the comment column is blank, either the interfaces are similar or no equivalent interface exists in either interface.

Table 8-8 TLI and Socket Equivalent Functions

TLI interface
Socket interface
t_bind(3NSL) sets the queue depth for passive sockets, but bind(3SOCKET) does not. For sockets, the queue length is specified in the call to listen(3SOCKET).
t_optmgmt(3NSL) manages only transport options. getsockopt(3SOCKET) and setsockopt(3SOCKET) can manage options at the transport layer, but also at the socket layer and at the arbitrary protocol layer.
t_getinfo(3NSL) returns information about the transport. getsockopt(3SOCKET) can return information about the transport and the socket.
getsockopt(3SOCKET) with the SO_ERROR option returns the same kind of error information as t_look(3NSL)t_look().
You do not need to bind the local endpoint before invoking connect(3SOCKET). Bind the endpoint before calling t_connect(3NSL). You can use connect(3SOCKET) on a connectionless endpoint to set the default destination address for datagrams. You can send data using connect(3SOCKET).
t_listen(3NSL) waits for connection indications. listen(3SOCKET) sets the queue depth.
sendto(3SOCKET) and sendmsg(3SOCKET) operate in connection mode as well as in datagram mode.
recvfrom(3SOCKET) and recvmsg(3SOCKET) operate in connection mode as well as datagram mode.
In XTI/TLI you must push the tirdwr(7M) module before calling read(2) or write(2). In sockets, calling read(2) or write(2) suffices.