Changed to give the default port number.
Fixed the coding style.
Added the utility methods to {read,write} session id {from,to} a stream.