[ClientSession] Added more documentation and minor change to socket.write