Closed GoogleCodeExporter closed 9 years ago
Thanks for taking a look. That piece of code is very core, so it is good to
have eyes on it.
Here's a quick overview of that piece of code: objects are serialized to the
"temp write buffer" which is then written to socket. Almost always this will
succeed, but if not, the temp buffer is copied to the larger "write buffer" to
be written later. This way the ideal scenario doesn't have any extra memory
copies. Also this allows us to write the length of serialized object before the
object without any extra memory copies.
I've added exception handling for the write buffer overflow. I rethrow a
SerializationException, which will cause the connection to be closed. This is
much better than a server crash, which was the previous behavior.
Thanks!
Original comment by nathan.s...@gmail.com
on 9 Aug 2010 at 11:06
Original issue reported on code.google.com by
Nephir...@gmail.com
on 9 Aug 2010 at 10:30