Commit Graph

71 Commits (master)

Author SHA1 Message Date
David Kebler 09da08b548 0.3.3 update deps 2020-07-26 15:32:48 -07:00
David Kebler b856710a3b 0.3.2 catch no consumer on send 2020-07-12 18:28:44 -07:00
David Kebler 9528e71abb 0.3.1 added 100ms delay to connection packet push to avoid issue where connection packet is not sent/received 2020-03-24 14:13:50 -07:00
David Kebler 70fee6fc7c 0.3.0 bumping to .3 with upcoming 3-2020 deployment of lighting system.
no apparent bugs
2020-03-15 15:25:46 -07:00
David Kebler 0d578958a8 0.2.33 refactor push, put in more send/write guards for closed stream 2020-02-10 21:38:56 -08:00
David Kebler 42d4b54008 0.2.31 support for multiple conPackets as an array 2020-01-18 22:34:52 -08:00
David Kebler 65169e3ded 0.2.30
socket-class.js
now emits 'socket' on socket listening state
added stop method to stop socket listening manually.  (no remote access via base yet)
added .name and .id to consumer from either packet props or packet data prop
consumer.js
  don't allow passed options mutation
  add .name prop
  merge in passed data option prop into authentication packet sent to socket
2020-01-14 13:38:50 -08:00
David Kebler 8a4fdf067c 0.2.29
socket:
  removed all 'client' names and replaced with 'consumer'
  switched to using MAP for holding consumers
  incoming consumer includes passing opts.data for passing consumer specific information to socket
consumer:
   supports opts.data for passing to socket
updated examples accordingly
2020-01-06 23:10:30 -08:00
David Kebler 70e16fa08d 0.2.28 Prevent epipe error exception on socket stream write 2019-12-18 18:15:58 -08:00
David Kebler d7fc89cafb 0.2.27 fix initial success handler that had the old event 2019-12-08 14:53:24 -08:00
David Kebler ba112c484e 0.2.26
refactor the connection events,  status is now log,
connection event is now connection:socket or connection:consumer
'online' to just 'connected'
2019-12-05 14:49:28 -08:00
David Kebler dcd178de7b 0.2.25 2019-12-02 15:11:26 -08:00
David Kebler 2314670c04 0.2.24 refactor consumer for more robust error/disconnect handling
add online/offline/pause/resume to json stream
removed bad 'connection' emits from socket-class as that event is already used by actual consumer connections.
2019-12-02 14:31:38 -08:00
David Kebler e29b4ba838 0.2.23 2019-11-27 14:32:54 -08:00
David Kebler 18a65b42c5 0.2.22
add active getter
emit status active when connect state changes
2019-11-21 10:04:48 -08:00
David Kebler 7502902a51 0.2.21 add ability to set the default return command as option defaultReturnCmd
add consumer-connection emits
change name in connection handler to consumer from socket
add getClientIndex and getClient to api methods
2019-09-16 18:10:57 -07:00
David Kebler 5f28baaa74 0.2.20 emit status events in consumer
refactor listen method into a handler
2019-09-08 19:49:35 -07:00
David Kebler 6862d912b2 refactored create to better handle the listening and promise resolution 2019-08-29 13:42:28 -07:00
David Kebler 8078831971 0.2.19
register authenticator added to consumer and socket
default consumer authenticator looks for token in environment or opts or sets to 'default'
default socket authenticator looks for token validator method
add and remove token methods
default token validator method just checks sent token against list
can register alt token validator
improved authenticate function to handle fail reason and anonymous connect
2019-08-28 09:02:27 -07:00
David Kebler 3299e9125e refactored _send in socket class
added authentifcation with default being a token
attach any passed client name to server side client socket
2019-08-23 15:48:39 -07:00
David Kebler 375790bfc4 Add client ID to connected client on server and remove client when it closes 2019-08-20 10:52:59 -07:00
David Kebler 3bf375c8fd 0.2.18 Major refactor of consumer/client. Initial connect with promise resolution now separate from listening and reconnect handling. Added server ping and conusmer ping monitoring to know when to try a reconnect. Other errors will give a reconnect as well. 2019-08-20 10:52:02 -07:00
David Kebler db3e2e8054 0.2.17 Update Deps 2019-08-14 14:06:44 -07:00
David Kebler a332219bdd 0.2.16 truly fixed the client connect/reconnect so it works even if initially no connection was made 2019-08-14 13:31:37 -07:00
David Kebler 47fa6380bf 0.2.14 2019-05-01 15:34:18 -07:00
David Kebler ccf9ab8c8a modify default timeout to 120 seconds and add in enironment variable to allow changing it 2019-05-01 15:34:07 -07:00
David Kebler 456b9568ff 0.2.13 add better error handling to avoid reconnrest execpetion 2019-04-28 09:58:35 -07:00
David Kebler 072dd25dc4 0.2.12 update deps, clean up logging, merged in tlc branch, TLS not implemented! but had many other changes to merge 2019-04-26 10:23:30 -07:00
David Kebler 81bb898ab4 0.2.11 refactored consumer connect/reconnect to be more robust
emits both
also keeps track of ready state
2019-04-12 08:00:45 -07:00
David Kebler 1c3c4383c8 0.2.10 0.2.9 up the initial connect timeout to 5 mintues, and reconnect to 2 seconds 2019-03-24 11:49:00 -07:00
David Kebler fbff2796c0 0.2.8 2019-03-17 13:52:08 -07:00
David Kebler ea7610e1a0 bind close method 2019-03-17 13:51:36 -07:00
David Kebler b587d5f2f2 0.2.7 change no host when port supplied warning, update to new logger location 2019-02-26 11:43:10 -08:00
David Kebler 609c2b51ca 0.2.3
added tls version of socket
2019-02-11 21:45:30 -08:00
David Kebler 7f8703e9c4 0.2.2 2019-01-25 20:34:00 -08:00
David Kebler 9ce3226f93 set up socket/server for TLS option
using command Socket Class extending either plain or tls server class
2019-01-05 15:16:13 -08:00
David Kebler 63beca4199 Added server push method. Pushes to any/all connected clients with id='pushed' which clients can listen for
Add jsdoc documenation to source and did a few experiments with doc generators
2019-01-01 16:53:12 -08:00
David Kebler 6a8c2b1fca fixed initial timeout on connect rejection.
add in new option conPacket for pushing a packet to any connecting consumer from a socket/server
2018-07-31 17:17:39 -07:00
David Kebler 01c4756e26 with keepAlive set (by default) if the socket terminates the consumer will attempt to reconnect indefinitely 2018-07-30 19:07:03 -07:00
David Kebler 36d1cf629f fix file delete (unlink) so catches error uses promise 2018-05-27 13:05:38 -07:00
David Kebler 949bd5b3b1 add client tracking on server side and push notification processin to both. Pushed packets have _header.id of 'pushed' and server has new push method 2018-05-24 12:28:30 -07:00
David Kebler e2e59466be upgrade to esm from @std/esm 2018-05-16 07:21:51 -07:00
David Kebler 1f45aec2fa refactor options processing, remove opts.np 2018-03-02 08:34:10 -08:00
David Kebler 283957f641 fix bug with incoming packet cloning 2018-02-23 21:17:37 -08:00
David Kebler 19a2b6a150 updated dev dependencies 2018-02-23 13:45:22 -08:00
David Kebler 8dd5f05582 change imports to npm from local paths 2018-02-17 18:26:17 -08:00
David Kebler 5ada8cd43a cloned incoming socket side packet immediately before processing and copying over header. 2018-02-14 13:26:35 -08:00
David Kebler 450a85d8b9 switched to _header property for packet id
added sender and responder info to header
_header can now be used for anything specifically socket related
Fixed bug where socket must create a copy of processed packet to avoid issue when coder returns the original packet just altered from the packet processor
2018-02-13 13:51:58 -08:00
David Kebler 28768c8007 refactor send/write so send is async and will wait for reponse from socket.
write now makes sure to drain before allowing another packet write
refactored tests with new await send returning processed packet.
2018-02-12 17:10:41 -08:00
David Kebler d3b979b1fd catching errors in json stream serialize
added environment variable SOCKETS_DIR for socket directory
2018-02-11 19:58:22 -08:00