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

cn.xishan.oftenporter.bridge.http.websocket.Session Maven / Gradle / Ivy

Go to download

转接远程的http接口,服务器响应正确的数据格式必须是JResponse定义的格式。 客户端websocket使用"org.java-websocket:Java-WebSocket:1.5.2",项目地址https://github.com/TooTallNate/Java-WebSocket; 对Java-WebSocket做了适当修改。

The newest version!
package cn.xishan.oftenporter.bridge.http.websocket;

import java.nio.ByteBuffer;
import java.util.Map;

/**
 * @author Created by https://github.com/CLovinr on 2017/11/20.
 */
public interface Session
{
    /**
     * 调用后将不会连接。
     */
    void close(int code, String reason);

    /**
     * 调用后将不会连接。
     */
    void close();

    boolean isClosed();

    void sendPing(ByteBuffer applicationData);

    void sendPong(ByteBuffer applicationData);

    void send(String text);

    void send(ByteBuffer byteBuffer);

    void send(byte[] bs);

    String getId();

    Map getUserProperties();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy