Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/youngmonkeys/ezyfox-server-es6-client
ezyfox-server-es6-client
https://github.com/youngmonkeys/ezyfox-server-es6-client
es6 javascript-client websocket
Last synced: 3 months ago
JSON representation
ezyfox-server-es6-client
- Host: GitHub
- URL: https://github.com/youngmonkeys/ezyfox-server-es6-client
- Owner: youngmonkeys
- License: apache-2.0
- Created: 2018-09-05T06:14:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-13T09:47:59.000Z (7 months ago)
- Last Synced: 2024-10-13T21:46:23.240Z (4 months ago)
- Topics: es6, javascript-client, websocket
- Language: JavaScript
- Size: 89.8 KB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ezyfox-server-es6-client
![]()
javascript emacs 6 client for ezyfox server# Synopsis
javascript emacs 6 client for ezyfox server
# Documentation
[https://youngmonkeys.org/ezyfox-es6-client-sdk/](https://youngmonkeys.org/ezyfox-es6-client-sdk/)
# Installation
```
npm i ezyfox-es6-client
```# Code Example
You can find the full example [here](https://github.com/youngmonkeys/freechat/tree/master/reactjs/src/socket)
**1. Create ws client**
```javascript
var config = new Ezy.ClientConfig;
config.zoneName = "zoneName";
var clients = Ezy.Clients.getInstance();
var client = clients.newDefaultClient(config);
```**2. Setup ws client**
```javascript
var setup = client.setup;
setup.addEventHandler(Ezy.EventType.DISCONNECTION, disconnectionHandler);
setup.addDataHandler(Ezy.Command.HANDSHAKE, handshakeHandler);
setup.addDataHandler(Ezy.Command.LOGIN, userLoginHandler);
setup.addDataHandler(Ezy.Command.APP_ACCESS, accessAppHandler);
var setupApp = setup.setupApp("appName");
setupApp.addDataHandler("command", function(app, data) {
controller.contactController.handleSuggestedContactsResponse(data);
});
```**3. Connect to server**
```javascript
client.connect("ws://localhost:2208/ws");
```# Used By
1. [Freechat]([https://youngmonkeys.org/asset/freechat/](https://github.com/youngmonkeys/freechat))
# Tutorials
1. [EzyChat with ReactJS](https://youtube.com/playlist?list=PLlZavoxtKE1IfKY7ohkLLyv6YkHMkvH6G)
# Contact us
- Touch us on [Facebook](https://www.facebook.com/youngmonkeys.org)
- Ask us on [stackask.com](https://stackask.com)
- Email to me [Dzung](mailto:[email protected])# License
Apache License, Version 2.0