<?phpnamespace App\Net;/** * The line to the chat server: TCP for real (TcpLink), a scripted one in the tests (FakeLink). * Events (Evenement): open, data (string $bytes), close (?string $why), error (string $message). */interface Link{ public function on($event, callable $listener); public function write(string $bytes): void; public function close(): void;}