We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能否给个前后端的demo,以及是否支持stomp协议的订阅?
The text was updated successfully, but these errors were encountered:
现在是使用socketjs+stomp: `const socket = new SockJS("/websocket"); stompClient = Stomp.over(socket); stompClient.heartbeat.outgoing = 20000; stompClient.heartbeat.incoming = 20000;
return new Promise((resolve, reject) => { if (!stompClient) { return reject(); } stompClient.connect( headers, //init里面赋header () => { //成功回调 if (!stompClient) { return reject(); } console.log('已建立连接') resolve(stompClient); },`
返回403 查看返回的源码,在HttpServerHandler中: ` if (!req.headers().contains(UPGRADE) || !req.headers().contains(SEC_WEBSOCKET_KEY) || !req.headers().contains(SEC_WEBSOCKET_VERSION)) {
if (forbiddenByteBuf != null) { res = new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN, forbiddenByteBuf.retainedDuplicate()); } else { res = new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN); } sendHttpResponse(ctx, req, res); return; }` socketjs第一次是以http调用,确实未携带upgrade等头部,是不是意味着这不支持socketjs?
Sorry, something went wrong.
No branches or pull requests
能否给个前后端的demo,以及是否支持stomp协议的订阅?
The text was updated successfully, but these errors were encountered: