X.25 SVCs are very similar to TCP connections, and can be utilised for the same sorts of purposes.
As mentioned elsewhere, X.25 data transfer is packet-oriented (instead of being stream-based like TCP). This makes suitable for a large number of applications without the need for a further encapsulation layer. This makes data transfer over X.25 straightforward to implement when developing an application program.
A Switched Virtual Circuit is initiated by a DTE transmitting a Call Request packet to the network; the network will then set up a virtual circuit to a DTE on the other side of the network, where the packet will appear at the Called DTE as an Incoming Call packet.
Alternatively, the Called DTE may refuse the Incoming Call by transmitting a Clear Request packet.
Once a call has been accepted, then data transfer can commence. Unlike with TCP/IP, in which there is a 3-way sequence for connection set-up, the Called DTE can transmit a Data Packet immediately after sending the Call Accept packet. The Calling DTE can transmit Data Packets immediately after it receives the Call Connect packet. Data transfer is full-duplex, so either the Called or Calling party may initiate it, depending on the nature of the application (most application protocols are in practice half-duplex, so it would be unusual for both the Called and Calling DTEs to start transmitting as soon as they can).
Virtual Circuit Disconnection
Data transfer proceeds until one side or the other decides to end the virtual circuit, when a Clear Request packet is transmitted. Unlike TCP/IP, a Clear packet can overtake data, so an application should not clear a connection until it is sure that the remote peer has received any outstanding data blocks – usually something at the application protocol level is necessary to ensure this, although perhaps transmitting a zero-length data packet would be a way of achieving the same thing, if it is known that the peer would clear the connection on receipt of zero-length data.