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

Use something smarter than Show/Read for the websockets protocol #409

Open
nomeata opened this issue Dec 4, 2016 · 2 comments
Open

Use something smarter than Show/Read for the websockets protocol #409

nomeata opened this issue Dec 4, 2016 · 2 comments

Comments

@nomeata
Copy link
Contributor

nomeata commented Dec 4, 2016

I just tried to use Data.Serialize with generic deriving, but am stuck. While Network.WebSockets (the server side) has no problems sending binary data (as a ByteString) over the wire, the corresponding support in ghcjs, at https://github.com/ghcjs/ghcjs-base/blob/master/JavaScript/Web/MessageEvent.hs, seems to be shaky. I might get a Blob out, but I do not see how to get a ByteString out.

I think I was at this point before, so I record this here.

Either I need to figure out how to work with ByteString in GHCJS, or use a different serialization library which targets Data.Text.

@nomeata
Copy link
Contributor Author

nomeata commented Dec 4, 2016

There is some conversion code in https://hackage.haskell.org/package/reflex-dom-0.3/candidate/src/src-ghcjs/Reflex/Dom/Internal/Foreign.hs but ideally I’d like to use something more polished.

@nomeata
Copy link
Contributor Author

nomeata commented Dec 7, 2016

Let’s see if the internets can help at http://stackoverflow.com/q/41007007/946226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Multiplayer API
  
Pending
Development

No branches or pull requests

2 participants