Added the networking core of the server.
Fixed a problem where the old buffer was not being flipped before its
contents were added to the new (expanded) buffer.