| @@ 54-64 (lines=11) @@ | ||
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| 54 | public function useLeft() : Connection |
|
| 55 | { |
|
| 56 | list($left, $right) = $this->sockets; |
|
| 57 | ||
| 58 | fclose($right); |
|
| 59 | ||
| 60 | $this->mode = self::LEFT_SIDE; |
|
| 61 | $this->connection = new Connection($left, $this->loop); |
|
| 62 | ||
| 63 | return $this->connection; |
|
| 64 | } |
|
| 65 | ||
| 66 | public function useRight() : Connection |
|
| 67 | { |
|
| @@ 66-76 (lines=11) @@ | ||
| 63 | return $this->connection; |
|
| 64 | } |
|
| 65 | ||
| 66 | public function useRight() : Connection |
|
| 67 | { |
|
| 68 | list($left, $right) = $this->sockets; |
|
| 69 | ||
| 70 | fclose($left); |
|
| 71 | ||
| 72 | $this->mode = self::RIGHT_SIDE; |
|
| 73 | $this->connection = new Connection($right, $this->loop); |
|
| 74 | ||
| 75 | return $this->connection; |
|
| 76 | } |
|
| 77 | ||
| 78 | public function shutdown() |
|
| 79 | { |
|