Skip to content

Added WebSocket Examples for REQ-REP and PUB-SUB#102

Open
jassems wants to merge 7 commits intofeatherweight:masterfrom
jassems:master
Open

Added WebSocket Examples for REQ-REP and PUB-SUB#102
jassems wants to merge 7 commits intofeatherweight:masterfrom
jassems:master

Conversation

@jassems
Copy link

@jassems jassems commented Aug 31, 2016

Examples - have a look.

Related - when I formalize the javascript nanomsg websocket API, I'll reach out to pull that under the src directory?

Perhaps:

  • ~/src/socket/browser/FTW-Browser-RequestResponse-Client.js
  • ~/src/socket/browser/FTW-Browser-Subscriber-Client.js
  • ~/srs/socket/browser/_support/jquery.min.js

Thoughts:

  • will update examples to use the client / javascript APIs
  • removed the version number from jquery file to more easily upgrade?
  • perhaps examples could link to the src version of jQuery instead of the ~/examples/_support directory?
  • perhaps examples should have the dev version of jQuery (unminified, version in comments)?

@jassems
Copy link
Author

jassems commented Sep 17, 2016

v1 FTW WebSocket API ready and integrated into examples.

…h any "custom arguments" to pass along to the callback (convenience) and the scope in which to call the callback (defaults to scope of the FtwWebSocketRequster instance)

- the callback function is passed the reply (object) as the first argument, and any "custom arguments" as the second argument
- onMessage also / still fires for all received messages if specified, else is silent
- ToDo: add these same "custom" capabilities to the standard callbacks as well (ex. onMessage)
…ching all with onMessage

- minor updates / comments to the other existing examples
@JackDunaway
Copy link
Member

I'll soon be looking at this, but at first glance have the following feedback: perhaps we can use native DOM events rather than jQuery as a dependency? This would require running on a modern, compliant browser, but that shouldn't be a problem anymore. The spirit here is to make examples as bare-bones as possible -- ESPECIALLY because I'm interested in also converting this into a Test. (e.g., launch the page in a default browser, then inspect output expected from LV side.)

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.

2 participants