Skip to content

TcpConnector - are writes buffered or sent immediately? #262

@ondrejmirtes

Description

@ondrejmirtes

Hi,
I'm debugging something in PHPStan and I'd like to know if the writes made on the ConnectionInterface are buffered in any way (if they're waiting to be sent on the next loop tick etc.) or if they're sent synchronously - immediately.

$tcpConector = new \React\Socket\TcpConnector($loop);
$tcpConector->connect(sprintf('127.0.0.1:%d', $port))->done(function (ConnectionInterface $connection): void {
    // I'm asking about this:
    $connection->write(...);
});

I'm kind of lost on debugging this by myself because of the complex object hierarchy, many interface implementations etc.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions