public class PipeHandle extends Handle
See Pipe handle
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected StreamCloseCallback |
onClose |
protected StreamConnectCallback |
onConnect |
protected StreamConnectionCallback |
onConnection |
protected StreamReadCallback |
onRead |
protected StreamShutdownCallback |
onShutdown |
protected StreamWriteCallback |
onWrite |
protected boolean |
readStarted |
| Modifier and Type | Method and Description |
|---|---|
int |
accept(com.oracle.libuv.StreamHandle client)
Accepts connections.
|
int |
bind(String name)
Bind the pipe to a file path (Unix) or a name (Windows).
|
protected void |
callClose() |
protected void |
callConnect(int status,
Exception error,
Object context) |
protected void |
callConnection(int status,
Exception error) |
protected void |
callRead(ByteBuffer data) |
protected void |
callShutdown(int status,
Exception error,
Object context) |
protected void |
callWrite(int status,
Exception error,
Object context) |
void |
close() |
int |
closeWrite() |
void |
connect(String name) |
boolean |
isReadable() |
boolean |
isWritable() |
int |
listen(int backlog) |
void |
readStart() |
void |
readStop() |
void |
setCloseCallback(StreamCloseCallback callback) |
void |
setConnectCallback(StreamConnectCallback callback) |
void |
setConnectionCallback(StreamConnectionCallback callback) |
void |
setReadCallback(StreamReadCallback callback) |
void |
setShutdownCallback(StreamShutdownCallback callback) |
void |
setWriteCallback(StreamWriteCallback callback) |
int |
write(ByteBuffer buffer) |
int |
write(ByteBuffer buffer,
int offset,
int length) |
int |
write(String str) |
int |
write(String str,
Charset encoding) |
long |
writeQueueSize() |
protected boolean closed
protected boolean readStarted
protected StreamReadCallback onRead
protected StreamWriteCallback onWrite
protected StreamConnectCallback onConnect
protected StreamConnectionCallback onConnection
protected StreamCloseCallback onClose
protected StreamShutdownCallback onShutdown
public int bind(String name)
name - socket, pipe or FIFO name.0 on success, or an error code < 0 on failure.public int accept(com.oracle.libuv.StreamHandle client)
This call is used in conjunction with listen(int) to accept incoming
connections.
Call this function after receiving a StreamConnectionCallback to accept
the connection. Before calling this function the client handle must be
initialized.
0 on success, or an error code < 0 on failure.public void connect(String name)
public void setReadCallback(StreamReadCallback callback)
public void setWriteCallback(StreamWriteCallback callback)
public void setConnectCallback(StreamConnectCallback callback)
public void setConnectionCallback(StreamConnectionCallback callback)
public void setCloseCallback(StreamCloseCallback callback)
public void setShutdownCallback(StreamShutdownCallback callback)
public void readStart()
public void readStop()
public int write(String str)
public int write(ByteBuffer buffer, int offset, int length)
public int write(ByteBuffer buffer)
public int closeWrite()
public void close()
public int listen(int backlog)
public boolean isReadable()
public boolean isWritable()
public long writeQueueSize()
protected void callRead(ByteBuffer data)
protected void callConnection(int status,
Exception error)
protected void callClose()
Copyright © 2021 WebFolder. All rights reserved.