Skip to content
New issue

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

[WIP] Channels - high level web sockets abstraction #158

Merged
merged 7 commits into from
Mar 22, 2019

Conversation

Krzysztof-Cieslak
Copy link
Member

@Krzysztof-Cieslak Krzysztof-Cieslak commented Dec 13, 2018

Fix #103

let guid = Guid.NewGuid().ToString()
sockets.[path].AddOrUpdate (guid, webSocket, fun _ _ -> webSocket) |> ignore

let buffer : byte [] = Array.zeroCreate 4096

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't rely on 4096 being the message size. echo will have a EndOfMessage bool telling you if that message frame as more to read. See https://github.com/TheAngryByrd/FSharp.Control.WebSockets/blob/master/src/FSharp.Control.Websockets.TPL/FSharp.Control.Websockets.TPL.fs#L54-L77 for an example you can steal.

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit 7bae5d4 into master Mar 22, 2019
@Krzysztof-Cieslak Krzysztof-Cieslak deleted the channels branch June 18, 2020 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants