Commit Graph

63 Commits

Author SHA1 Message Date
akwizgran 5bb8e95b26 Pass original message to BDF validators and hooks. 2016-03-08 17:03:22 +00:00
akwizgran 88ab694af8 No need to unwrap Bytes before adding to dictionary. 2016-03-04 21:11:25 +00:00
akwizgran 5998412a8a Use ClientHelper in PrivateMessageFactoryImpl. 2016-03-04 21:10:52 +00:00
akwizgran cc7ffee28d Superclass for validating messages that are BDF lists. 2016-03-04 21:10:44 +00:00
akwizgran 8beff5c743 Use ClientHelper in MessagingManagerImpl. 2016-03-04 21:07:33 +00:00
akwizgran 640f5484e0 Moved PrivateGroupFactory to clients package. 2016-02-29 14:25:29 +00:00
akwizgran e3374b7584 Rename BDF methods. 2016-02-29 11:57:42 +00:00
akwizgran 9f8baab60f Code cleanup. 2016-02-11 16:26:23 +00:00
akwizgran de8cc50fb4 Moved transactions out of database component. 2016-02-11 16:26:19 +00:00
akwizgran ef2b2b9710 Removed unneeded visibility methods. 2016-02-11 16:21:53 +00:00
akwizgran 675ce4bfef Removed direct calls to DB's contact/identity methods. 2016-02-11 16:21:52 +00:00
akwizgran 18db17bf5b Moved subscription updates to the client layer. 2016-02-10 10:47:30 +00:00
akwizgran 3837efca6b Updated group-related events and exceptions. 2016-02-10 10:47:26 +00:00
akwizgran 9d537dce00 Removed contact subscriptions from database. 2016-02-10 10:46:41 +00:00
akwizgran e76aef3dc8 Unshared messages. 2016-01-29 13:45:22 +00:00
akwizgran 4e17621081 Factored out code for creating private groups. 2016-01-28 18:05:01 +00:00
akwizgran 88475bdd54 Transport properties client. #229 2016-01-27 12:51:55 +00:00
akwizgran 88a8081351 Metadata for groups. #221 2016-01-20 15:03:42 +00:00
akwizgran 3c543b0d62 Fixed crash caused by using DB too early in lifecycle. 2016-01-20 15:03:10 +00:00
akwizgran 281ca734e3 Addressed issues from code review. 2016-01-20 14:43:47 +00:00
akwizgran 82cf12040f Contact manager hooks. #209 2016-01-20 14:43:46 +00:00
akwizgran 33ef09a6bf Implement Service interface rather than extending it.
Whether or not a class needs to run as a service is an implementation decision.
2016-01-20 14:43:46 +00:00
akwizgran 77054cbae7 Small improvements to DB interface. 2016-01-20 10:35:14 +00:00
akwizgran 5355951466 Separate the sync layer from its clients. #112 2016-01-20 10:35:09 +00:00
akwizgran 805bf39ec8 Created TransportPropertyManager facade. 2016-01-04 12:56:06 +00:00
akwizgran f899bc0c38 Facade for private message headers. #173 2015-12-17 16:56:58 +00:00
akwizgran 87689855da Facades for private messaging. #173 2015-12-17 16:56:58 +00:00
akwizgran 52720c5c04 Pass-through implementations of UI/DB interfaces. 2015-12-17 16:56:57 +00:00
akwizgran e370cafb12 Moved classes from messaging package to sync package. 2015-12-15 15:05:06 +00:00
akwizgran 027ae8340f Whitespace-only code formatting changes. 2015-11-30 09:38:25 +00:00
akwizgran 41c4c4d808 Renamed raw data type. 2015-05-02 21:05:23 +01:00
akwizgran b8e37a5421 Renamed serial component to data, moved consumers to briar-core. 2015-05-02 20:39:24 +01:00
akwizgran 416719e3d9 Removed silly SerialComponent interface. 2015-05-02 20:30:25 +01:00
akwizgran 32c9ce50d9 Moved the messaging protocol one step closer to BSP.
This breaks backward compatibility for the wire protocol and messages
stored in the database. The database schema version has been
incremented.
2015-05-01 16:59:27 +01:00
akwizgran 47bd84122e Code formatting and small cleanups. 2015-01-28 21:18:31 +00:00
akwizgran 388b36b6be Check periodically for retransmittable packets. Bug #46. 2014-12-14 20:26:41 +00:00
akwizgran 29a6596ee3 Use the transport's idle timeout, not a hardcoded value. 2014-12-14 15:18:39 +00:00
akwizgran d4fa656dbb Application layer keepalives to detect dead TCP connections.
DuplexOutgoingSession flushes its output stream if it's idle for a
transport-defined interval, causing an empty frame to be sent. The TCP
and Tor plugins use a socket timeout equal to twice the idle interval to
detect dead connections.

See bugs #27, #46 and #60.
2014-12-13 12:00:40 +00:00
akwizgran ab467b3d3e Flush the output stream before rather than after waiting for packets.
See bug #27.
2014-11-09 18:03:24 +00:00
akwizgran 4b92de619c Added missing packet handlers to IncomingSession. 2014-11-09 17:20:06 +00:00
akwizgran 1d20761123 Messaging sessions aren't responsible for closing their streams.
The TransportReader/Writer's dispose() method should handle that, and
ConnectionManager is responsible for calling it.
2014-11-06 13:13:23 +00:00
akwizgran 1f4d801162 Interrupt all messaging sessions when the app starts shutting down.
This makes it more likely that connections will be closed cleanly.
However, the interrupt() method is currently ineffective for incoming
sessions as it won't interrupt a blocking read, e.g. when the packet
reader is waiting for a packet.
2014-11-06 08:24:08 +00:00
akwizgran 852a618cb3 Interrupt messaging session if contact or transport is removed. 2014-11-06 08:10:29 +00:00
akwizgran 26d93b83b4 Factored out StreamReader/Writer from messaging layer. 2014-11-05 19:22:01 +00:00
akwizgran dfa4860200 Cancel database queries if the messaging session has been interrupted. 2014-11-05 18:34:59 +00:00
akwizgran 33c3eb7308 PacketWriters aren't responsible for flushing their output streams. 2014-11-04 17:03:06 +00:00
akwizgran 7b8181e309 Massive refactoring to merge handling of simplex and duplex connections. 2014-11-04 16:51:25 +00:00
akwizgran b24f153704 Renamed a load of things from 'connection' to 'stream'. 2014-10-08 16:21:55 +01:00
akwizgran 8b8df435a5 Separated event infrastructure from DB. 2014-10-03 09:44:54 +01:00
akwizgran f90f7c5e7b Use a single-threaded executor for the database.
This ensures that if two DatabaseExecutor tasks update the database and
broadcast events, the events are broadcast in the same order as the
updates occurred.
2014-07-04 15:16:55 +01:00