Package org.java_websocket
Class SocketChannelIOHelper
- java.lang.Object
-
- org.java_websocket.SocketChannelIOHelper
-
public class SocketChannelIOHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description SocketChannelIOHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
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:
WrappedByteChannel.readMore(ByteBuffer)
-
batch
public static boolean batch(WebSocketImpl ws, ByteChannel sockchannel) throws IOException
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()
-
-