Commit Graph

7 Commits

Author SHA1 Message Date
John Brooks 32230b77c1 core: Reuse protobuf structures for configuration
The existing configuration was partially compatible with Ricochet's,
but not enough to actually be useful. It also required a bunch of
boilerplate code to copy data between configuration data structures,
internal data structures, and RPC data structures.

Protobuf conveniently supports encoding messages to JSON, and we already
need to store most data (e.g. contacts) in protobuf structures. This
commit changes the configuration to be a protobuf JSON serialization of
the Config message, which can directly reuse RPC messages like Contact.

Additionally, the RWMutex-based configuration type was a deadlock
waiting to happen. There is now a read-only clone of the configuration
available atomically at any time. Writers need an exclusive lock on the
ConfigFile object, which commits its changes to disk and readers on
unlock.
2017-09-24 16:59:44 -06:00
John Brooks b5301c2782 Implement inbound contact request protocol
This implements a handler for inbound contact request connections,
taking advantage of the synchronous Process API.

This is largely untested code at the moment.
2017-09-23 19:19:24 -06:00
John Brooks 0c187e72a0 Port core to the new go-ricochet API
This includes connection management and enough to compile, but doesn't
reimplement most of the protocol messages and functionality yet. There
are problems noted throughout the code, also.
2017-09-23 19:17:43 -06:00
John Brooks 23e22f0260 core: Minor fixes for inbound contact requests 2017-08-11 18:04:28 -06:00
John Brooks dcda924d56 core: Implement inbound contact requests
This does not yet include persistence of inbound requests in the config,
and it's mostly untested, but it's more or less complete.
2017-08-10 11:26:09 -06:00
John Brooks 70af42e39e core: Remove old placeholder files 2016-10-15 19:17:54 -06:00
John Brooks 0508f0b5e3 Skeleton of core API 2016-06-30 21:18:55 -06:00