fix undefined $size in CLI mode

The `send` method returns `return $size;` which is not defined in CLI mode.