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

WebSocket Client #52

Closed
bryaan opened this issue Feb 24, 2016 · 8 comments
Closed

WebSocket Client #52

bryaan opened this issue Feb 24, 2016 · 8 comments

Comments

@bryaan
Copy link

bryaan commented Feb 24, 2016

We have a server so how about a client?

Would this be easy to implement?

@tmlbl
Copy link

tmlbl commented Mar 8, 2016

I am interested in working on this, can anyone point me in the right direction?

@bryaan
Copy link
Author

bryaan commented Mar 8, 2016

Figuring out how meteor checks for updated code would be a good place to
start. It might be a simple one liner, or it could be systemic.

On Monday, March 7, 2016, Tim notifications@github.com wrote:

I am interested in working on this, can anyone point me in the right
direction?


Reply to this email directly or view it on GitHub
#52 (comment)
.

@hustf
Copy link
Collaborator

hustf commented Nov 3, 2017

Clients are called in the current tests. They pick from common browsers and phantoms, whichever are available on the system running the test. The code for opening linux browsers may or may not be working for the browsers - I don't have linux. Try Pkg.test("WebSockets") if you have linux.

@hustf hustf closed this as completed Nov 3, 2017
@hgeorgako
Copy link

Having an example of how to use a websocket client from julia would be very useful in the documentation. Can't find anything online. All examples reference non julia clients.

@hustf
Copy link
Collaborator

hustf commented Dec 24, 2017

This package implements server side only. Dandelionwebsockets aims to implement both, but there is a current lack of maintainers.

The current examples are written with anonymous functions, which I personally find complicates debugging. The examples in the test folders are written in a quite different style which you may possibly find easier to follow, depending on where you are coming from. The client side interfaces are written in the most basic javascript. I find chrome the most user friendly client side implementation.

I hope I understood your issue reasonably well, and would appreciate if you could share details of your use case.

@hustf
Copy link
Collaborator

hustf commented Dec 24, 2017

You may also want to study Blink, Atom, Electron, IJuliaEscher and other dependendants. I do not find those as easy to understand, but then that may be different for you.

@hgeorgako
Copy link

Use case is fairly simple. I need to connect to a websocket that disseminates timeseries data in the form of a json object.
An event looks like:

{“Time”:”2017-12-12 04:34:23.324343”, “Val”:123}

I want to take every event that arrives and (in Julia) store it in an array. After 100 events have arrived, I want to sum the entries and flush the array.

@hustf
Copy link
Collaborator

hustf commented Dec 25, 2017

I am travelling without a computer. One way you can get going is modifying directly the test files;
Put your code in handler_functions_websockets_general_test line.jl line 16. Strip away what you dont need later.

What I call the client side code resides in browsertest.html

Now output from your code is the tricky part. Write to a file or write to a mutable const are two options. Calling outside functions with the output from websocket communication is another. In time, I plan to give an example communicating with other processes over a Zmq queue.

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

No branches or pull requests

4 participants