Commit Graph

15 Commits (df9a879fef6e0ead0f44834126799c151a40bc63)

Author SHA1 Message Date
David Kebler df9a879fef added logging 2018-03-02 08:35:25 -08:00
David Kebler 2e07dab28d add bindFuncs method for binding a whole module of functions to the base instance (this) or a given call site
update deps
2018-02-23 21:18:06 -08:00
David Kebler e6774301c2 flop send to have name first then packet 2018-02-13 22:31:02 -08:00
David Kebler d0173c045f With changes in socket module now send is async and returns the response from the socket.
send now transport send now process as many consumer sockets as have been created by pushing them onto array and the using promise.all and map to send out together.
Return for one than one is an array of responses.
getPacketByName was added to make it easy to grab just one of those in returned array.
2018-02-13 14:19:18 -08:00
David Kebler b938647efe improved namespace handling and added transport namespacing
added / delimiter to command/subcommand
2018-02-06 20:40:00 -08:00
David Kebler ddd81ea671 refactored processing and packet command function lookup based on priortized namespaces. Packets can now have subcommands by use using . or : which will look in sub keys for the command sub function 2018-02-05 22:05:38 -08:00
David Kebler e5059368a9 changed sockets options now can add as many as you want of either type and transport
improved socket packet processing call now binds this and name of socket that received packet for processing
single common processor for all packets incoming (either consumer or socket)
default processing splits into socket or consumer
default processing has calls looking for packet cmd functions before returning error packet
1. Added Namespace // TODO
2. A Pariticular Sockect
3. Root of instance
4. The socket type and transport //TODO
5. The socket type
there are helper functions for adding cmd functions to any of these save the root instance we you can add directly.
2018-02-04 14:18:21 -08:00
David Kebler 8c61ec854d refactored adding sockets so as many sockets of any type and transport can be added 2018-02-02 14:09:52 -08:00
David Kebler 51986fbcc7 fix registerpacketcontext
add generating and id when one not given
2018-02-02 09:19:27 -08:00
David Kebler 9679f61aae moved default processing to constructor
push creates and connects to array and use promise.all
cleanup amend and register functions
alter send function and add sendTCP and sendIPC
2018-01-30 21:12:38 -08:00
David Kebler 3c1340baf0 fixed separation of packet properties for each socket type when customizing
add amendPacket.. and changed registerPacket to accept single type changes

The four-in-one example now using amend and register sucessfully
2018-01-29 21:52:24 -08:00
David Kebler a83646c4f6 refactor base so it works with latest uci-socket
four-in-one example working
make Base instance (this) the default context for all socket packet commands
2018-01-28 22:37:54 -08:00
David Kebler 3015798068 Nearly functional uci base module
supports one each unix tcp sockets and clients in any combination with default and custom packet processing
2018-01-18 21:32:07 -08:00
David Kebler c3e94b465e initial commit 2017-12-21 15:50:05 -08:00
David Kebler 6b9b399ee5 initial commit 2017-12-21 15:47:14 -08:00