Commit graph

18 commits

Author SHA1 Message Date
Andrew Kelley
38194ee9b4 add test, ping, and 2 API changes
* passing test: responds to ping requests
 * `mc.ping` - ping a server for info
 * `createServer`: `options.timeout` -> `options.checkTimeoutInterval`
 * `Client` emits `connect` event
2013-01-04 21:33:19 -05:00
Andrew Kelley
1661ef3b4b API updates
* test passing: kicks clients that do not log in
 * index exports `Client` and `Server`
 * `createServer`: `options.keepAliveInterval` -> `options.kickTimeout`
 * `Client` event `end` includes `reason` argument
   - `LoginTimeout`
   - `KeepAliveTimeout`
   - `ServerShutdown`
 * `createClient`: Set `options.keepAlive` to `false` to disable sending
   keep alive packets
 * `Client`: `options.isServer` defaults to `false`.
2013-01-04 20:55:53 -05:00
Andrew Kelley
c9ed8a2792 server API update
* add passing test for "starts listening"
 * server.socket -> server.socketServer
 * add client.id which can be used as entity id
 * add server.clients which is {clientId: client}
 * update server examples
 * server emits 'close' event, not 'end' event
 * add server.close()
2013-01-04 20:22:19 -05:00
Andrew Kelley
3a8bfaf8e3 refactor + createServer support 2013-01-04 01:45:57 -05:00
Andrew Kelley
d38dad2d56 move packets to protocol, refactor 2013-01-03 23:14:19 -05:00
Andrew Kelley
d331532d0d don't use buffer-more-ints. closes #11 2013-01-03 22:30:39 -05:00
Andrew Kelley
62e66be053 writePacket -> write 2013-01-03 21:42:50 -05:00
Andrew Kelley
f70110a646 remove unused variable 2013-01-03 21:15:48 -05:00
Andrew Kelley
cc3480ee91 better names for byteArray / bigByteArray 2013-01-03 21:02:44 -05:00
Andrew Kelley
fadb9e0c0a un-namespace packet events. remove generic packet event. 2013-01-03 20:59:58 -05:00
Andrew Kelley
0247fc9cb8 packets.json -> packets.js 2013-01-03 20:53:24 -05:00
Andrew Kelley
79695daa23 fix player position and look. closes #10 2013-01-02 21:57:31 -05:00
Andrew Kelley
646c7676c6 emit packets in their own channel as well 2013-01-02 05:25:53 -05:00
Andrew Kelley
4237787082 add an assert 2013-01-02 04:46:01 -05:00
Andrew Kelley
4b0780db66 all tests passing. closes #3 2013-01-02 03:30:33 -05:00
Andrew Kelley
bde45a3d33 test passing: connects successfully - offline mode 2013-01-02 02:19:47 -05:00
Andrew Kelley
c2beb41fef test passing: connects successfully - online mode 2013-01-02 01:12:42 -05:00
Andrew Kelley
c405ac21f8 refactor into nice npm module. closes #7 2013-01-01 23:39:31 -05:00
Renamed from lib/parser.js (Browse further)