abstract Pipe
package eval.luv
to Handle, Stream, TStream<Pipe>, SocketHandle
Available on macro
Static methods
staticbind(this:Pipe, nameOrAddress:NativeString):Result<NoData>
Assigns a pipe a name or an address.
staticconnect(this:Pipe, target:NativeString, callback:(result:Result<NoData>) ‑> Void):Void
Connects to the pipe at the given name or address.
staticgetSockName(this:Pipe):Result<NativeString>
Retrieves the name or address assigned to the pipe.
staticinit(loop:Loop, forHandlePassing:Bool = false):Result<Pipe>
Allocates and initializes a pipe.
The pipe is not yet connected to anything at this point.
The handle should be cleaned up with eval.luv.Handle.close
when no longer needed.
staticpendingInstances(this:Pipe, amount:Int):Void
Set the number of pending pipe instance handles when the pipe server is waiting for connections.
staticreceiveHandle(this:Pipe):ReceiveHandle
Receives a file descriptor over the given pipe.
File descriptors are sent using the sendHandle
argument of eval.luv.Stream.write2
.
On the receiving end, call eval.luv.Stream.readStart
. When that function
calls its callback, there may be file descriptors in the pipe, in addition
to the ordinary data provided to the callback.
To check, call this function eval.luv.Pipe.recieveHandle
in a loop until
it returns NONE
. Each time it returns TCP(associate)
or PIPE(associate)
,
create an appropriate handle using either eval.luv.TCP.init
or eval.uv.Pipe.init
,
and call associate
to receive the file descriptor and associate it with handle.