java.lang.Object
com.oracle.libuv.Handle
com.oracle.libuv.TCPHandle
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected StreamCloseCallbackprotected StreamConnectCallbackprotected StreamConnectionCallbackprotected StreamReadCallbackprotected StreamShutdownCallbackprotected StreamWriteCallbackprotected boolean -
Method Summary
Modifier and TypeMethodDescriptionintaccept(com.oracle.libuv.StreamHandle client)intintintprotected voidprotected voidcallConnect(int status, Exception error, Object context)protected voidcallConnection(int status, Exception error)protected voidcallRead(ByteBuffer data)protected voidcallShutdown(int status, Exception error, Object context)protected voidvoidclose()intintbooleanbooleanintlisten(int backlog)voidvoidreadStop()voidsetCloseCallback(StreamCloseCallback callback)voidsetConnectCallback(StreamConnectCallback callback)voidsetConnectionCallback(StreamConnectionCallback callback)intsetKeepAlive(boolean enable, int delay)intsetNoDelay(boolean enable)voidsetReadCallback(StreamReadCallback callback)voidsetShutdownCallback(StreamShutdownCallback callback)intsetSimultaneousAccepts(boolean enable)voidsetWriteCallback(StreamWriteCallback callback)intintintwrite(ByteBuffer buffer)intwrite(ByteBuffer buffer, int offset, int length)long
-
Field Details
-
closed
protected boolean closed -
readStarted
protected boolean readStarted -
onRead
-
onWrite
-
onConnect
-
onConnection
-
onClose
-
onShutdown
-
-
Method Details
-
bind
-
bind
-
bind
-
connect
-
listen
public int listen(int backlog) -
accept
public int accept(com.oracle.libuv.StreamHandle client) -
getSocketName
-
getPeerName
-
setNoDelay
public int setNoDelay(boolean enable) -
setKeepAlive
public int setKeepAlive(boolean enable, int delay) -
setSimultaneousAccepts
public int setSimultaneousAccepts(boolean enable) -
setReadCallback
-
setWriteCallback
-
setConnectCallback
-
setConnectionCallback
-
setCloseCallback
-
setShutdownCallback
-
readStart
public void readStart() -
readStop
public void readStop() -
write
-
write
-
write
-
write
-
closeWrite
public int closeWrite() -
close
public void close() -
isReadable
public boolean isReadable() -
isWritable
public boolean isWritable() -
writeQueueSize
public long writeQueueSize() -
callRead
-
callWrite
-
callConnect
-
callConnection
-
callClose
protected void callClose() -
callShutdown
-