org.java_websocket
Class SocketChannelIOHelper

java.lang.Object
  extended by org.java_websocket.SocketChannelIOHelper

public class SocketChannelIOHelper
extends Object


Constructor Summary
SocketChannelIOHelper()
           
 
Method Summary
static boolean batch(WebSocketImpl ws, ByteChannel sockchannel)
          Returns whether the whole outQueue has been flushed
static boolean read(ByteBuffer buf, WebSocketImpl ws, ByteChannel channel)
           
static boolean readMore(ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)
           
static void writeBlocking(WebSocketImpl ws, ByteChannel channel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketChannelIOHelper

public SocketChannelIOHelper()
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
Returns:
returns whether there is more data left which can be obtained via readMore(ByteBuffer, WebSocketImpl, WrappedByteChannel)
Throws:
IOException
See Also:
WrappedByteChannel.readMore(ByteBuffer)

batch

public static boolean batch(WebSocketImpl ws,
                            ByteChannel sockchannel)
                     throws IOException
Returns whether the whole outQueue has been flushed

Throws:
IOException

writeBlocking

public static void writeBlocking(WebSocketImpl ws,
                                 ByteChannel channel)
                          throws InterruptedException,
                                 IOException
Throws:
InterruptedException
IOException


Copyright © 2013 Pusher. All Rights Reserved.