[comp.protocols.tcp-ip.ibmpc] TLI vs. sockets comparison revisited

nobody@lll-tis.arpa (User for running unprivileged daemons) (11/26/87)

More on sockets vs. TLI 

System calls comparison of socket and TLI.

-------------------------------------------------------------------------------
socket		TLI			functionality
-------------------------------------------------------------------------------
select		poll			for asynchronous I/O
socket		t_open			open a socket (or connection end-point)
close		t_unbind,close,t_close	close a socket
shutdown	t_snddis,t_sndrel	disconnect
bind		t_bind			bind address to socket
listen		t_listen		watch for incoming calls
accept		t_accept		accept a connection request
connect		t_connect		ask for a connection
read		read                    obvious
write		write			ditto
recv		t_rcv			ditto
send		t_snd			ditto
recvfrom	t_rcvudata		for datagrams
sendto		t_sndudata		for datagrams

It's no wonder why TLI seems to be more compatible with OSI - it has
been invented recently.  BSD sockets use different address format (structure)
for different domains, thus Internet, UNIX, XNS domain address structures
differ accordingly.  TLI ep address space is allocated via t_alloc and
t_free - t_alloc determines a particular address format for a particular
protocol family automatically.  OSI Tranport Layer Protocols doesn't
guarantee all pending data will be transferred when the connection gets
shutdown - it's done by the Session Layer.  
TCP handles this graceful close.  Socket library calls, I think,
is tailored to fit this TCP scheme.  When you "close" without "shutdown"
first, graceful close is implemented automatically.  "shutdown"ing first
doesn't guarantee anything.  TLI t_sndrel explicitly tells STREAM protocol
module to support graceful close; t_snddis does the opposite.

TLI and STREAMS have much going for them.  Already implementations of
TP4, TCP/IP, X.25 are beginning to emerge for STREAMS.

I think both socket, and TLI could have been better.  I also think we
can pretty much use what we have to do what we want, therefore am
thankful to those who implemented these calls.
Only I (not my employer) am responsible for what I said here.
Hwa Jin Bae                      (415) 463-6865 | Control Data Corp.
bae@{lll-tis.arpa,lll-aftac.arpa}    (internet) | 4234 Hacienda Dr. 
{ames,ihnp4,lll-crg}!lll-tis!plseca!hbae (UUCP) | Pleasanton, CA 94566