public class UdpBioAsyncConnection extends AsyncConnection
详情见: https://redkale.org
attributes, beforeCloseListener, bufferConsumer, bufferSupplier, closedCounter, eventing, livingCounter, readBuffer, readtime, sslContext, subobject, writetime
构造器和说明 |
---|
UdpBioAsyncConnection(java.util.function.Supplier<java.nio.ByteBuffer> bufferSupplier,
java.util.function.Consumer<java.nio.ByteBuffer> bufferConsumer,
java.nio.channels.DatagramChannel ch,
javax.net.ssl.SSLContext sslContext,
java.net.SocketAddress addr0,
boolean client0,
int readTimeoutSeconds0,
int writeTimeoutSeconds0,
java.util.concurrent.atomic.AtomicLong livingCounter,
java.util.concurrent.atomic.AtomicLong closedCounter) |
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
java.net.SocketAddress |
getLocalAddress() |
int |
getReadTimeoutSeconds() |
java.net.SocketAddress |
getRemoteAddress() |
int |
getWriteTimeoutSeconds() |
boolean |
isOpen() |
boolean |
isTCP() |
int |
read(java.nio.ByteBuffer dst) |
void |
read(java.nio.channels.CompletionHandler<java.lang.Integer,java.nio.ByteBuffer> handler) |
<T> boolean |
setOption(java.net.SocketOption<T> name,
T value) |
void |
setReadTimeoutSeconds(int readTimeoutSeconds) |
void |
setWriteTimeoutSeconds(int writeTimeoutSeconds) |
boolean |
shutdownInput() |
boolean |
shutdownOutput() |
java.util.Set<java.net.SocketOption<?>> |
supportedOptions() |
int |
write(java.nio.ByteBuffer src) |
<A> void |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler) |
<A> void |
write(java.nio.ByteBuffer src,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler) |
beforeCloseListener, clearAttribute, create, create, create, create, create, create, create, create, create, createTCP, createTCP, createTCP, decreEventing, dispose, getAttribute, getAttributes, getBufferConsumer, getBufferSupplier, getLastReadTime, getLastWriteTime, getSubobject, increEventing, offerBuffer, offerBuffer, pollReadBuffer, pollWriteBuffer, removeAttribute, setAttribute, setReadBuffer, setSubobject, write
public UdpBioAsyncConnection(java.util.function.Supplier<java.nio.ByteBuffer> bufferSupplier, java.util.function.Consumer<java.nio.ByteBuffer> bufferConsumer, java.nio.channels.DatagramChannel ch, javax.net.ssl.SSLContext sslContext, java.net.SocketAddress addr0, boolean client0, int readTimeoutSeconds0, int writeTimeoutSeconds0, java.util.concurrent.atomic.AtomicLong livingCounter, java.util.concurrent.atomic.AtomicLong closedCounter)
public void setReadTimeoutSeconds(int readTimeoutSeconds)
setReadTimeoutSeconds
在类中 AsyncConnection
public void setWriteTimeoutSeconds(int writeTimeoutSeconds)
setWriteTimeoutSeconds
在类中 AsyncConnection
public int getReadTimeoutSeconds()
getReadTimeoutSeconds
在类中 AsyncConnection
public int getWriteTimeoutSeconds()
getWriteTimeoutSeconds
在类中 AsyncConnection
public final java.net.SocketAddress getRemoteAddress()
getRemoteAddress
在类中 AsyncConnection
public java.net.SocketAddress getLocalAddress()
getLocalAddress
在类中 AsyncConnection
public boolean shutdownInput()
shutdownInput
在类中 AsyncConnection
public boolean shutdownOutput()
shutdownOutput
在类中 AsyncConnection
public <T> boolean setOption(java.net.SocketOption<T> name, T value)
setOption
在类中 AsyncConnection
public java.util.Set<java.net.SocketOption<?>> supportedOptions()
supportedOptions
在类中 AsyncConnection
public <A> void write(java.nio.ByteBuffer[] srcs, int offset, int length, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
write
在类中 AsyncConnection
public void read(java.nio.channels.CompletionHandler<java.lang.Integer,java.nio.ByteBuffer> handler)
read
在类中 AsyncConnection
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
在接口中 java.nio.channels.ReadableByteChannel
read
在类中 AsyncConnection
java.io.IOException
public <A> void write(java.nio.ByteBuffer src, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
write
在类中 AsyncConnection
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
在接口中 java.nio.channels.WritableByteChannel
write
在类中 AsyncConnection
java.io.IOException
public final void close() throws java.io.IOException
close
在接口中 java.io.Closeable
close
在接口中 java.lang.AutoCloseable
close
在接口中 java.nio.channels.Channel
close
在类中 AsyncConnection
java.io.IOException
public final boolean isOpen()
isOpen
在接口中 java.nio.channels.Channel
isOpen
在类中 AsyncConnection
public final boolean isTCP()
isTCP
在类中 AsyncConnection