Rusty Russell
39120b3ac6
daemon: async DNS lookups.
Also based on pettycoin code.
(With embarrassing bug fixed where it didn't increment the address used,
thus using 100% CPU if that connect failed!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
e4224f72d4
daemon: netaddr
Structure for a net address. We can expand it later to cover exotic
address types (Tor?).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
469401610f
daemon: socket code.
At the moment, if you connect it just says Hello! and closes the socket.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
c28a9ce6c7
daemon: lightning-cli
Minimal possible implementation; not real parsing or pretty printing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
9ccb51c93f
daemon: UNIX domain socket for JSON-based control.
Also taken from pettycoin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
6ccfcf4477
daemon: timeout structure for IO.
For better or worse, the ccan/timer structure is completely minimal,
and designed to be wrapped inside a container structure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
ac4491909c
daemon/json: helpers for using jsmn.
Also taken from pettycoin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
0c81b0918a
daemon/jsmn: build the module.
Can't build inside the submodule, as that makes it dirty.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
378dadc371
daemon: configuration directory (default ~/.lightning).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
117cf6b02d
daemon: add logging options.
Particularly logging to file.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
3e77c55a3b
Makefile: add daemon source sanity checks.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
dd35260ce8
daemon: first code.
Logging code based heavily on pettycoin's.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago