This code has been reviewed and submitted internally. Feel free to discuss on the PR and we can submit follow-up changes as necessary.
Commits:
Change ServerSocketService to provide a way of receiving a connection as a simple InputStream rather than as an OpenedSocket (which is for serialized object based communication).
As part of this, change the UUID associated with each socket connection to be sent as raw bytes rather than as a serialized Java object so that connections can be established without either end needing to create an ObjectInputStream or ObjectOutputStream.
2e0da16a5ac22a092d772abccebc97e7b50cf9d0
-------
Change OpenedSocket.Writer.write(Object) to automatically flush after writing since every single place write() was called was immediately followed by flush(), several times with a comment about how that was necessary to prevent deadlock. Also make it accept varargs and write each object so it works with the one place that was writing multiple objects before flushing.
7c82fc07ed7d382cd07b383c71872629ad98b5d6
This code has been reviewed and submitted internally. Feel free to discuss on the PR and we can submit follow-up changes as necessary.
Commits:
Change ServerSocketService to provide a way of receiving a connection as a simple InputStream rather than as an OpenedSocket (which is for serialized object based communication). As part of this, change the UUID associated with each socket connection to be sent as raw bytes rather than as a serialized Java object so that connections can be established without either end needing to create an ObjectInputStream or ObjectOutputStream. 2e0da16a5ac22a092d772abccebc97e7b50cf9d0 -------
Change OpenedSocket.Writer.write(Object) to automatically flush after writing since every single place write() was called was immediately followed by flush(), several times with a comment about how that was necessary to prevent deadlock. Also make it accept varargs and write each object so it works with the one place that was writing multiple objects before flushing. 7c82fc07ed7d382cd07b383c71872629ad98b5d6