Built-in I/O Providers
Input/Output providers are library modules that abstract I/O scheme in ascp4 architecture. ascp4 has the following three built-in I/O providers:
- file (as a simple path or file://path)
- TCP (as tcp://192.168.120.11)
- UDP (as udp://233.3.3.3)
File provider
The local disk can be specified for ascp4 I/O by using a simple path or URL that starts with file. The following paths identify the same file (/test/ascp4.log) on the disk:
- file:////test/ascp4.log
- /test/ascp4.log
- file://localhost:/test/ascp4.log
Similarly, the following URLs identify the same file (test/ascp4.log) on the disk:
- file:///test/ascp4.log
- test/ascp4.log
TCP provider
A TCP video stream can be used for ascp4 I/O by specifying a URL that starts with tcp. ascp4 reads TCP data from the source and writes TCP data on the destination. Use the following format to specify a TCP provider on the source or destination:
- tcp://ip_address:port[?option=value[&option=value]]
The TCP provider of the sender can also be specified with the following format:
- tcp://:port[?option=value[&option=value]]
With this format, ascp4 listens on the specified port up to a specified
time (maxidle
, see the following description of options for TCP provider
URLs).
The TCP provider URL accepts the following options:
port=
N — Set the network port number, default: 0.iosize=
N — Specify the read/write size, default: 32 KB.maxsize=
N — Set the maximum stream length, in bytes, no default.maxtime=
N — Set the maximum stream duration, in seconds, no default.maxidle=
N — Set the maximum idle duration, in seconds, default: 10 sec.rcvbufsz=
N — Set the receive buffer size, default: 4 MB.sndbufsz=
N — Set the send buffer size, default: 4 MB.-
ifaddr=
ip_address — Specify the TCP connection interface address. srcaddr=
ip_address — Specify the TCP connection source-specific address.
UDP provider
A UDP video stream can be specified for ascp4 I/O by using a URL that starts with udp. If the UDP stream is a multicast IP address, then ascp4 connects to the multicast address. ascp4 reads the UDP datagrams on the source and writes UDP datagrams on the destination. A UDP-provider filepath has the following format:
- udp://ip_address:port[?option=value[&option=value]]
The UDP provider URL accepts the following options:
pktbatch={0|1}
— Enable packet batching in read/write. Default: 1.maxsize=
N — Set the maximum stream length. Default: unlimited.maxtime=
N — Set the maximum stream duration, in seconds. Default: unlimited.maxidle=
N — Set the maximum idle duration, in seconds. Default: unlimited.rcvbufsz=
N — Set the receive buffer size. Default: 10 MB.sndbufsz=
N — Set the send buffer size. Default: 10 MB.ifaddr=
ip_address — Set the multicast interface. Default: 0.0.0.0.srcaddr=
ip_address — Set the multicast source for IGMPb3 source-specific multicast.ttl=
N — Set the multicast time-to-live. Default: 1.loopback=
N — Set the multicast loopback. Default: 1.dontfrag=
N — Prevent fragmentation of outgoing packets. Default: 0.