Skip to content

Commit f4e6073

Browse files
committed
Issue menacher#37 Readme fixed with changes for removing reference to non-existing Events class
1 parent 2f373a5 commit f4e6073

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

jetclient-js/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
This is a javascript client project for [jetserver](https://github.com/menacher/java-game-server/tree/master/jetserver) library. An example html which can connecct to a locally running Jetserver is located at src/test/jetclient.html .
1+
This is a **Javascript** client project for [jetserver](https://github.com/menacher/java-game-server/tree/master/jetserver) library. An example html which can connect to a locally running Jetserver is located at **test/jetclient.html**.
22

33
About the Client
44
================
5-
Click on `start war` button after loading jetclient.html in a websocket enabled browser to start the game. Assumption is that JetServer is running and jetclient.html is using accurate hostname and port number.
5+
Click on `Start War!` button after loading jetclient.html in a websocket compatible browser to start the game. Assumption is that Jetserver is running and jetclient.html is using accurate hostname and port number.
66

77
Usage as your own game client
88
=============================
99
The general usage steps could be as outlined below.
10-
1. Create a config object containing the username, password and connectionkey to connect to game room. If you are using a different protocol, then add the appropriate codec chains also to the config object. By default JSon encoding/decoding is used.
11-
2. Create a session using the session factory by passing in a url for the remote jetserver, config object and a callback function which will receive the session object after successful login to remote jeteserver.
12-
3. Create as many sessions as required using this factory. Generally only one is required for a client. In the example 50 sessions are created.
13-
4. Add necessary handlers to the session using `addHandler` function. The default events generated are provided the jet.Events class. At the very least you would want to add a handler for the jet.Events.SESSION_MESSAGE event to receive incoming events from jetserver.
10+
1. Create a `config` object containing the `user`, `password` and `connectionkey` to connect to game room. If you are using a different protocol, then add the appropriate `CodeChain`'s also to the `config` object. By default `JSon` encoding/decoding is used.
11+
2. Create a `session`(s) using the `SessionFactory` by passing in a `url` for the remote jetserver, `config` object and a `callback` function which will receive the `session` object after successful login to remote jeteserver.
12+
3. Add necessary handlers to the session using `addHandler` function. The default events are provided the `jet` class for e.g `jet.lOG_IN`. At the very least you would want to add a handler for the `jet.SESSION_MESSAGE` event to receive incoming events from jetserver.
13+
4. Event objects to be sent to server can be created using the `jet.nevent` function.
1414
5. Data can be send to remote server using `session.send` function.
1515

1616
Happy Coding!!

0 commit comments

Comments
 (0)