All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pusher.java_websocket.WrappedByteChannel Maven / Gradle / Ivy

The newest version!
package com.pusher.java_websocket;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;

import javax.net.ssl.SSLException;

public interface WrappedByteChannel extends ByteChannel {
	public boolean isNeedWrite();
	public void writeMore() throws IOException;

	/**
	 * returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
	 * 
	 * @see #read(ByteBuffer)
	 * @see #readMore(ByteBuffer)
	 **/
	public boolean isNeedRead();
	/**
	 * This function does not read data from the underlying channel at all. It is just a way to fetch data which has already be received or decoded but was but was not yet returned to the user.
	 * This could be the case when the decoded data did not fit into the buffer the user passed to {@link #read(ByteBuffer)}.
	 **/
	public int readMore( ByteBuffer dst ) throws SSLException;
	public boolean isBlocking();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy