Total Complexity | 5 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class Connection extends NET implements Server |
||
18 | { |
||
19 | /** |
||
20 | * @var HTTP |
||
21 | */ |
||
22 | private $chan = null; |
||
23 | |||
24 | /** |
||
25 | * @var ServerRequest |
||
26 | */ |
||
27 | private $request = null; |
||
28 | |||
29 | /** |
||
30 | * @param HTTP $chan |
||
31 | * @return Server |
||
32 | */ |
||
33 | public function from(HTTP $chan) : Server |
||
34 | { |
||
35 | $this->chan = $chan; |
||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param ServerRequest $request |
||
41 | * @return static |
||
42 | */ |
||
43 | public function setRequest(ServerRequest $request) : self |
||
44 | { |
||
45 | $this->request = $request; |
||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return ServerRequest |
||
51 | */ |
||
52 | public function request() : ServerRequest |
||
53 | { |
||
54 | return $this->request; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param Response $response |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function reply(Response $response) : bool |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function close() : bool |
||
72 | } |
||
73 | } |
||
74 |