Transport Layer protocol Examples

A simple transport protocol

connum = CONNECT(local, remote)
connum = LISTEN(local)
status = DISCONNECT(connum)
status = SEND(connum, buffer, bytes)
status = RECEIVE(connum, buffer, bytes)
  1. Idle -- Connection not established yet
  2. Waiting -- CONNECT has been executed and CALL REQUEST sent
  3. Queued -- A CALL REQUEST has arrived; LISTEN has not been done
  4. Established -- The connection has been established
  5. Sending -- The user is waiting for permission to trnansmit a packet
  6. Receiving -- A RECEIVE has been done
  7. Disconnecting -- A DISCONNECT has been done locally

Examples

Sockets

    
 -----------------------------------   
Socket        Create a TSAP of a given type   
 -----------------------------------   
Bind          Associate an ASCII name to a previously created socket  
 -----------------------------------   
Listen        Create a queue to store incoming connection requests  
 -----------------------------------   
Accept        Remove a connection request from the queue or wait for one  
 -----------------------------------   
Connect       Initiate a connection with a remote socket  
 -----------------------------------    
Shutdown      Terminate the connection on a socket  
 -----------------------------------    
Send          Send a message through a given socket  
 -----------------------------------   
Recv          Receive a message on a given socket  
 -----------------------------------   
Select        Check a set of sockets to see if any can be read or written  
 -----------------------------------   
 
Code that Uses Sockets:Examples

Return to Networks home page

Last Changed:27 September 1995