Package org.java_websocket
Class SocketChannelIOHelper
java.lang.Object
org.java_websocket.SocketChannelIOHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
batch
(WebSocketImpl ws, ByteChannel sockchannel) Returns whether the whole outQueue has been flushedstatic boolean
read
(ByteBuffer buf, WebSocketImpl ws, ByteChannel channel) static boolean
readMore
(ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)
-
Constructor Details
-
SocketChannelIOHelper
private SocketChannelIOHelper()
-
-
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()
-