Package org.java_websocket
Class SocketChannelIOHelper
- java.lang.Object
-
- org.java_websocket.SocketChannelIOHelper
-
public class SocketChannelIOHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SocketChannelIOHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
batch(WebSocketImpl ws, java.nio.channels.ByteChannel sockchannel)
Returns whether the whole outQueue has been flushedstatic boolean
read(java.nio.ByteBuffer buf, WebSocketImpl ws, java.nio.channels.ByteChannel channel)
static boolean
readMore(java.nio.ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)
-
-
-
Method Detail
-
read
public static boolean read(java.nio.ByteBuffer buf, WebSocketImpl ws, java.nio.channels.ByteChannel channel) throws java.io.IOException
- Throws:
java.io.IOException
-
readMore
public static boolean readMore(java.nio.ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel) throws java.io.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:
java.io.IOException
- May be thrown byWrappedByteChannel.readMore(ByteBuffer)
#- See Also:
WrappedByteChannel.readMore(ByteBuffer)
-
batch
public static boolean batch(WebSocketImpl ws, java.nio.channels.ByteChannel sockchannel) throws java.io.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:
java.io.IOException
- May be thrown byWrappedByteChannel.writeMore()
-
-