netty-socketio与socketio.js版本兼容

阅读更多

基于1.7.12重写setNsp方法

src/main/java/com/corundumstudio/socketio/protocol/Packet.java

    public void setNsp(String endpoint) {
        if(endpoint.endsWith(",")) {
            endpoint = endpoint.substring(0, endpoint.indexOf(","));
        }
        if (endpoint.contains("?")) {
            endpoint = endpoint.substring(0, endpoint.indexOf("?"));
        }
        this.nsp = endpoint;
    }

 

 

你可能感兴趣的:(netty-socketio与socketio.js版本兼容)