A pipe is a unidirectional data channel that can be used for interprocess communication. Outgoing pipes are written to by this process, incoming pipes are read from by this process.
class ref _Pipe
Creates a nil pipe for use as a placeholder.
new ref none() : _Pipe ref^
Creates an outgoing pipe.
new ref outgoing() : _Pipe ref^ ?
Creates an incoming pipe.
new ref incoming() : _Pipe ref^ ?
Prepare the pipe for read or write, and listening, after the far end has been handed to the other process.
fun ref begin( owner: AsioEventNotify tag) : None val
Close the far end of the pipe--the end that the other process will be using. This is used to cleanup this process' handles that it wont use.
fun ref close_far() : None val
fun ref read( read_buf: Array[U8 val] iso, offset: USize val) : (Array[U8 val] iso^ , ISize val , I32 val)
fun ref write( data: (String box | Array[U8 val] box), offset: USize val) : (ISize val , I32 val)
fun ref is_closed() : Bool val
Close the near end of the pipe--the end that this process is using directly. Also handle unsubscribing the asio event (if there was one). File descriptors should always be closed after unsubscribing its event, otherwise there is the possibility of reusing the file descriptor in another thread and then unsubscribing the reused file descriptor here! Unsubscribing and closing the file descriptor should be treated as one operation.
fun ref close_near() : None val
fun ref close() : None val
fun ref dispose() : None val
Do the actual system object creation for the pipe.
fun ref _create() : None val ?
fun box _set_fd( fd: U32 val, flags: I32 val) : None val ?
fun box _set_fl( fd: U32 val, flags: I32 val) : None val ?
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/process-_Pipe