public class TCPHandle extends 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) |
int |
bind(String address,
int port,
boolean ipv6) |
int |
bind(String address,
int port,
boolean ipv6,
EnumSet<TcpFlags> flags) |
int |
bind(String address,
int port,
boolean ipv6,
int flags) |
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() |
int |
connect(String address,
int port,
boolean ipv6) |
Address |
getPeerName() |
Address |
getSocketName() |
boolean |
isReadable() |
boolean |
isWritable() |
int |
listen(int backlog) |
void |
readStart() |
void |
readStop() |
void |
setCloseCallback(StreamCloseCallback callback) |
void |
setConnectCallback(StreamConnectCallback callback) |
void |
setConnectionCallback(StreamConnectionCallback callback) |
int |
setKeepAlive(boolean enable,
int delay) |
int |
setNoDelay(boolean enable) |
void |
setReadCallback(StreamReadCallback callback) |
void |
setShutdownCallback(StreamShutdownCallback callback) |
int |
setSimultaneousAccepts(boolean enable) |
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 address, int port, boolean ipv6)
public int bind(String address, int port, boolean ipv6, int flags)
public int connect(String address, int port, boolean ipv6)
public int listen(int backlog)
public int accept(com.oracle.libuv.StreamHandle client)
public Address getSocketName()
public Address getPeerName()
public int setNoDelay(boolean enable)
public int setKeepAlive(boolean enable,
int delay)
public int setSimultaneousAccepts(boolean enable)
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 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.