POS buffers
POS terminals and applications rely on buffers to store information that is sent and received. The following sections describe the various buffers and how they are used.
POS terminal buffers
POS terminal buffers are classified into the terminal receive buffer and the terminal send buffer.
Terminal send buffer—Stores packets destined for a POS terminal until they can be sent.
Terminal receive buffer—Stores stores packets sent from a POS terminal until they can be processed.
For a POS terminal using TCP access, a combination of the socket receive buffer and TCP retransmission mechanism is used instead of the terminal receive buffer. The POS TCP terminal may have multiple TCP connections, and each TCP connection requires an independent terminal send buffer. Therefore, the POS terminal may contain multiple terminal send buffers. When the router receives a writable message from the socket, it picks up data from a terminal send buffer and sends the data to the FEP.
For a POS terminal using dial-up or flow access, the terminal send and receive buffers are used. The router periodically sends packets stored in the terminal send buffer to the POS terminal. When a POS access interface is down or the TCP connection to the POS terminal is disconnected, packets received from the interface or POS terminal are deleted from the terminal send buffer. The serial port driver receives packets from the terminal and stores them in the terminal receive buffer. When the terminal receive buffer receives a complete packet, the serial port driver informs the POS access service to pick up packets for processing.
POS application buffers
POS application buffers are classified into the application send buffer and the application receive buffer.
Application send buffer—Stores packets destined for a POS application until they can be sent.
Application receive buffer—Stores packets sent from a POS application until they can be processed.
If a POS application employs TCP, a combination of the socket receive buffer and TCP retransmission mechanism is used instead of the application receive buffer. An application template may have multiple TCP connections to the FEP and each TCP connection requires an independent application send buffer. Therefore, the POS application template may contain multiple application send buffers. When the router receives a writable message from the socket, it picks up data from an application send buffer and sends the data to the FEP.
If the POS application employs flow connections, the application send and receive buffers are used. The POS application periodically picks up packets from the application send buffer and sends them to the FEP. If sending of packets is blocked, the POS application waits and sends them next time. When a POS access interface is down or the TCP connection to the POS terminal is disconnected, packets received from the interface or POS terminal are deleted from the application send buffer.
The serial port driver receives packets from the FEP and stores them in the application receive buffer. When the application receive buffer receives a complete packet, the serial port driver informs the POS access service to pick up packets for processing.