xin.alum.aim.websocks.WebSocketHandShake Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aim-starter Show documentation
Show all versions of aim-starter Show documentation
aim-starter 基于netty的WebSocket和Socket通信包
package xin.alum.aim.websocks;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpResponseStatus;
/**
* WebSocket 握手处理
*
* @auther alum(alum @ live.cn)
* @date 2021/8/4 20:08
*/
public interface WebSocketHandShake {
/**
* 客户端请求握手,返回true则upgrage否则返回不支持
*
* @param ch
* @param req
* @return
*/
boolean onHandShake(Channel ch, FullHttpRequest req, FullHttpResponse httpResponse);
}