23 lines
459 B
PHP
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();
|
|
}
|
|
}
|