1<?php 2 3/** 4 * This file is part of the FreeDSx LDAP package. 5 * 6 * (c) Chad Sikorra <Chad.Sikorra@gmail.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12namespace FreeDSx\Ldap\Server; 13 14use FreeDSx\Socket\Socket; 15 16class ChildProcess 17{ 18 /** 19 * @var int 20 */ 21 private $pid; 22 23 /** 24 * @var Socket 25 */ 26 private $socket; 27 28 public function __construct( 29 int $pid, 30 Socket $socket 31 ) { 32 $this->pid = $pid; 33 $this->socket = $socket; 34 } 35 36 public function getPid(): int 37 { 38 return $this->pid; 39 } 40 41 public function getSocket(): Socket 42 { 43 return $this->socket; 44 } 45 46 public function closeSocket(): void 47 { 48 $this->socket->close(); 49 } 50} 51