link start!

This commit is contained in:
cherubin
2026-03-17 13:31:18 -07:00
commit 08abe87cfb
5910 changed files with 386288 additions and 0 deletions
@@ -0,0 +1,21 @@
package com.tridium.websockets;
import java.io.IOException;
public interface WebSocket {
void attachHandler(WebSocketEventHandler webSocketEventHandler);
void close(WebSocketCloseReason webSocketCloseReason, byte[] bArr) throws IOException;
WebSocketContext getContext();
String getKey();
WebSocketState getState();
void handshake() throws HandshakeException;
byte[] parse() throws IOException, SocketClosedException;
void send(byte[] bArr) throws IOException;
}
@@ -0,0 +1,18 @@
package com.tridium.websockets;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.baja.sys.Context;
public interface WebSocketContext extends Context {
InputStream getInputStream() throws IOException;
OutputStream getOutputStream() throws IOException;
String getRemoteHost();
String getRequestURI();
String getScheme();
}
@@ -0,0 +1,10 @@
package com.tridium.websockets;
import java.io.IOException;
import javax.baja.web.WebOp;
public interface WebSocketFactory {
WebSocket getWebSocket(WebOp webOp) throws NoSocketsAvailableException, HandshakeException, IOException;
void shutdown();
}
@@ -0,0 +1,27 @@
package com.tridium.websockets.niagara;
import java.io.IOException;
import java.io.OutputStream;
public interface WebSocketMessage {
public interface Frame {
byte[] getBytes();
byte getOpcode();
int getPayloadLength();
boolean getRSV1();
boolean getRSV2();
boolean getRSV3();
boolean isFin();
boolean isMask();
}
void write(OutputStream outputStream) throws IOException;
}
@@ -0,0 +1,5 @@
package com.tridium.websockets.router;
public interface SocketRegistrationFactory {
SocketRegistration createSocketRegistration(String str);
}