org.java_websocket.IDecodeInjector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Java-WebSocket Show documentation
Show all versions of Java-WebSocket Show documentation
A barebones WebSocket client and server implementation written in 100% Java.
package org.java_websocket;
import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
public interface IDecodeInjector {
boolean inject(WebSocketImpl webSocket, ByteBuffer socketBuffer);
static void write(WebSocketListener wsl, WebSocketImpl webSocket, ByteBuffer buf) {
LoggerFactory.getLogger(WebSocketImpl.class).trace("write({}): {}", buf.remaining(),
buf.remaining() > 1000 ? "too big to display" : new String(buf.array()));
webSocket.outQueue.add(buf);
wsl.onWriteDemand(webSocket);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy