Spout server support, few minor changes.

Signed-off-by: Moose517 <moose51789@gmail.com>