Commit Graph

25 Commits

Author SHA1 Message Date
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
akwizgran 79166e9b2f Reject subscription updates with duplicate entries. Bug #65. 2014-04-04 01:08:36 +01:00
akwizgran fc66f6ed8a Log the running time of key validation and message verification. 2014-03-22 00:30:29 +00:00
akwizgran 8c18773141 Write the tag immediately even if there are no packets to send. Bug #27. 2014-03-16 18:13:31 +00:00
akwizgran b270f0e8b1 Call Thread.currentThread().interrupt() when handling interruption. 2014-03-12 21:11:11 +00:00
akwizgran b99a503f24 Removed unnecessary conditionals from logging statements.
Very important stuff.
2014-03-12 21:00:14 +00:00
akwizgran 71a31c2a7a Include creation time in LocalAuthor.
This allows the oldest LocalAuthor to be used as the default.
2014-02-10 12:14:09 +00:00
akwizgran 4154119ea5 Convert to and from UTF-8 without catching impossible exceptions.
All JVMs must support UTF-8 encoding.
2014-02-07 22:02:02 +00:00
akwizgran cde4ca574f Check that author and group names aren't empty. 2014-01-31 17:23:14 +00:00
akwizgran 93890d56f6 GroupReader was looking for an optional key, not a mandatory salt.
This should've been changed when restricted groups were removed.
2014-01-31 17:21:51 +00:00
akwizgran 822392f9e7 Use strings rather than hashes to identify transports. Dev task #64. 2014-01-24 10:39:34 +00:00
akwizgran 6af3c54c28 Removed shouldFlush() from plugins, added missing PacketWriter method. 2014-01-15 17:10:25 +00:00
akwizgran db96994d5c Simplified the serialisation format. Other task #39.
The new format is simpler but less efficient for small integers, short
strings and short byte arrays.
2014-01-14 22:40:47 +00:00
akwizgran 832476412c Changed the root package from net.sf.briar to org.briarproject. 2014-01-08 16:18:30 +00:00