Skip to content

websocket parameter wrong interface #89

Closed
yene opened this issue Apr 9, 2020 · 4 comments
Closed

websocket parameter wrong interface #89

yene opened this issue Apr 9, 2020 · 4 comments

Comments

@yene
Copy link

yene commented Apr 9, 2020

app.ws('/', (req, ws) => {
  ws.end(3, 'Close message');
});

Visual Studio Code reports that ws is from the interface HttpResponse.

@dalisoft
Copy link
Member

Hi @yene

Thanks for bug report.
Can you create PR to fix this?

@bil-ash
Copy link

bil-ash commented Apr 11, 2020

@dalisoft please check whether it is an error in only the docs or not because even the uWS parameters order is same as that of ws (ws,req) .open = [](auto *ws, auto *req) . I do not think that you have just changed the parameters order in the library without any reason.

@dalisoft
Copy link
Member

I just changed order of function for compatibility.
I think a lot of peoples already know there should be ws not httpResponse, PR is welcome, but i cannot fix it currently or within current month

@dalisoft
Copy link
Member

@bil-ash I fixed it, can you check please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants