mirror of
https://github.com/YGGverse/nex-php.git
synced 2025-02-04 19:24:37 +00:00
fix handler function response
This commit is contained in:
parent
9daef40268
commit
52b43a252d
@ -73,12 +73,15 @@ $server->start(
|
||||
function (
|
||||
string $request,
|
||||
string $connect
|
||||
) {
|
||||
): ?string
|
||||
{
|
||||
printf(
|
||||
'connection: %s request: %s',
|
||||
$connect,
|
||||
$request
|
||||
);
|
||||
|
||||
return null; // null|string response
|
||||
}
|
||||
);
|
||||
```
|
||||
|
@ -145,6 +145,14 @@ class Server
|
||||
$request,
|
||||
$connect
|
||||
);
|
||||
|
||||
if ($response)
|
||||
{
|
||||
fwrite(
|
||||
$incoming,
|
||||
$response
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(
|
||||
|
Loading…
x
Reference in New Issue
Block a user