Package org.java_websocket
Class SocketChannelIOHelper
java.lang.Object
org.java_websocket.SocketChannelIOHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbatch(WebSocketImpl ws, ByteChannel sockchannel) Returns whether the whole outQueue has been flushedstatic booleanread(ByteBuffer buf, WebSocketImpl ws, ByteChannel channel) static booleanreadMore(ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)
-
Method Details
-
read
public static boolean read(ByteBuffer buf, WebSocketImpl ws, ByteChannel channel) throws IOException - Throws:
IOException
-
readMore
public static boolean readMore(ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel) throws IOException - Parameters:
buf- The ByteBuffer to read fromws- The WebSocketImpl associated with the channelschannel- The channel to read from- Returns:
- returns Whether there is more data left which can be obtained via
WrappedByteChannel.readMore(ByteBuffer) - Throws:
IOException- May be thrown byWrappedByteChannel.readMore(ByteBuffer)#- See Also:
-
batch
Returns whether the whole outQueue has been flushed- Parameters:
ws- The WebSocketImpl associated with the channelssockchannel- The channel to write to- Returns:
- returns Whether there is more data to write
- Throws:
IOException- May be thrown byWrappedByteChannel.writeMore()
-