$this->connections; } public TcpConnection $connection { get => $this->connection; } public Packet $packet { get => $this->packet; } public string $ip { get => $this->connection->getRemoteIp(); } public int $port { get => $this->connection->getRemotePort(); } /** * @var int 上下文创建时的时间 */ public int $createTime { get { return time(); } } public function __construct(array $connections,TcpConnection $connection, Packet $packet) { $this->connections = $connections; $this->connection = $connection; $this->packet = $packet; } }