public interface TcpHandler<N extends NetworkContext<N>> extends ClientClosedProvider, net.openhft.chronicle.core.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
default boolean |
hasTimedOut()
Check if an application-layer timeout has occurred, if this returns true,
the current connection will be dropped and a reconnection attempt will be made
|
default void |
onEndOfConnection(boolean heartbeatTimeOut) |
default void |
onReadTime(long readTimeNS,
ByteBuffer inBB,
int position,
int limit) |
default void |
onWriteTime(long writeTimeNS,
ByteBuffer byteBuffer,
int start,
int position) |
default void |
performIdleWork()
Perform any low priority work, called when the handler is not busy, or after it has been
busy for a long time.
|
void |
process(@NotNull net.openhft.chronicle.bytes.Bytes<?> in,
@NotNull net.openhft.chronicle.bytes.Bytes<?> out,
N nc)
The server reads the bytes
in from the client and sends a response out back
to the client. |
default void |
sendHeartBeat(net.openhft.chronicle.bytes.Bytes<?> out,
SessionDetailsProvider sessionDetails) |
hasClientClosedvoid process(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> in,
@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> out,
N nc)
in from the client and sends a response out back
to the client.in - the bytes send from the clientout - the response send back to the clientdefault void sendHeartBeat(net.openhft.chronicle.bytes.Bytes<?> out,
SessionDetailsProvider sessionDetails)
default void onEndOfConnection(boolean heartbeatTimeOut)
default void onReadTime(long readTimeNS,
ByteBuffer inBB,
int position,
int limit)
default void onWriteTime(long writeTimeNS,
ByteBuffer byteBuffer,
int start,
int position)
default void performIdleWork()
default boolean hasTimedOut()
Copyright © 2023. All rights reserved.