module Uq_transfer:sig
..end
Uq_io.copy_e
is a better choice.
The pure types async_in_channel
and async_out_channel
have been
proven to be useful for bridging with Netchannels
.
class type async_out_channel =object
..end
class type async_in_channel =object
..end
class pseudo_async_out_channel :#Netchannels.raw_out_channel ->
async_out_channel
Netchannels.raw_out_channel
as an asynchronous channel.
class pseudo_async_in_channel :#Netchannels.raw_in_channel ->
async_in_channel
Netchannels.raw_in_channel
as an asynchronous channel.
class receiver :src:Unix.file_descr -> dst:#async_out_channel -> ?close_src:bool -> ?close_dst:bool -> Unixqueue.event_system ->
[unit]
Uq_engines.engine
src
file descriptor to the
dst
output channel.
class sender :src:#async_in_channel -> dst:Unix.file_descr -> ?close_src:bool -> ?close_dst:bool -> Unixqueue.event_system ->
[unit]
Uq_engines.engine
src
input channel to the
dst
file descriptor.
class type async_out_channel_engine =object
..end
class type async_in_channel_engine =object
..end
class output_async_descr :dst:Unix.file_descr -> ?buffer_size:int -> ?close_dst:bool -> Unixqueue.event_system ->
async_out_channel_engine
async_out_channel
for the output
descriptor dst
.
class input_async_descr :src:Unix.file_descr -> ?buffer_size:int -> ?close_src:bool -> Unixqueue.event_system ->
async_in_channel_engine
typecopy_task =
[ `Bidirectional of Unix.file_descr * Unix.file_descr
| `Tridirectional of Unix.file_descr * Unix.file_descr * Unix.file_descr
| `Uni_socket of Unix.file_descr * Unix.file_descr
| `Unidirectional of Unix.file_descr * Unix.file_descr ]
copier
class has to do:
`Unidirectional(src,dst)
: Data from src
are copied to dst
.
EOF of src
causes that both descriptors are closed.`Uni_socket(src,dst)
: Data from src
are copied to dst
.
EOF of src
causes that dst
is shut down for sending; all descriptors
remain open. It is required that dst
is a socket.`Bidirectional(bi1,bi2)
: Data from bi1
are copied to bi2
,
and data from bi2
are copied to bi1
. EOF of one descriptor
causes that the other descriptor is shut down for sending.
When both descriptors are at EOF, both are closed.
It is required that bi1
and bi2
are sockets.`Tridirectional(bi,dst,src)
: Data from bi
are copied to dst
,
and data from src
are copied to bi
(i.e. a bidirectional
descriptor is split up into two unidirectional descriptors).
EOF of bi
causes that dst
is closed. EOF of src
causes
that bi
is shut down for sending. EOF in both directions
causes that all descriptors are closed. It is required that
bi
is a socket.class copier :copy_task -> Unixqueue.event_system ->
[unit]
Uq_engines.engine
copy_task
argument.
typeonshutdown_out_spec =
[ `Action of
async_out_channel_engine ->
Uq_engines.multiplex_controller -> unit Uq_engines.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
output_async_mplex
for explanationstypeonshutdown_in_spec =
[ `Action of
async_in_channel_engine ->
Uq_engines.multiplex_controller -> unit Uq_engines.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
input_async_mplex
for explanationsclass output_async_mplex :?onclose:[ `Ignore | `Write_eof ] -> ?onshutdown:onshutdown_out_spec -> ?buffer_size:int -> Uq_engines.multiplex_controller ->
async_out_channel_engine
output_async_descr
for the corresponding
class writing to a single descriptor).
class input_async_mplex :?onshutdown:onshutdown_in_spec -> ?buffer_size:int -> Uq_engines.multiplex_controller ->
async_in_channel_engine