Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\Client::sendSwoole\Client::sendto>
^Swoole\ClientLast updated: Mon, 26 Oct 2026

Swoole\Client::sendfile

(PECL swoole >= 1.9.0)

Swoole\Client::sendfile — Send file to the remote TCP socket.

Description

public function Swoole\Client::sendfile(string $filename, int $offset = ?): bool

This is a wrapper of the Linux sendfile system call.

Parameters

filename

File path of the file to send.

offset

Offset of the file to send

Return Values


<Swoole\Client::sendSwoole\Client::sendto>
^Swoole\ClientLast updated: Mon, 26 Oct 2026