Service primitives

A service is specified by a set of primitives available to a user process to access the
service. These primitives tell the service to perform some action or report on an action taken by a peer entity. The set of primitives available depends on the nature of the service being provided. The primitives for connection oriented are different from the connectionless service. The five different service primitives for implementing a simple connection oriented service
Listen: The server executes LISTEN to indicate that it is prepared to accept the incoming connection. The server process is blocked until a request for connection appears
Connect: the client process executes a CONNECT call to establish the connection with the server. Specify the address too. When the server receives this packet it unblocks the server and sends back the acknowledgement and this releases the client. At this point the client and server both are running. The connection established.
Receive: the server executes RECEIVE to prepare the first request. This call blocks the server.
Send: the client executes SEND to transmit its request followed by the execution of receive to get the reply. If the client has additional requests it makes now
Disconnect: The client use DISCONNECT to end the connection. The server also issues a acknowledgement to terminate the connection it send the disconnect.

The following figure shows the relationship between the service and the protocol
A service is the set of primitives or operations where as protocol are the rules.

0 comments