laylink/src/Node/NodeConnection.php
2026-05-28 20:19:28 +08:00

23 lines
459 B
PHP

<?php
declare(strict_types=1);
namespace LayLink\Node;
use Workerman\Connection\TcpConnection;
final class NodeConnection
{
public int $lastHeartbeat;
public int $activeSessions = 0;
public function __construct(
public readonly string $nodeId,
public readonly string $nodeType,
public readonly string $nodeZone,
public readonly TcpConnection $connection,
) {
$this->lastHeartbeat = time();
}
}