simplified sending responese
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace ComCen\Http;
|
||||
|
||||
use Ratchet\ConnectionInterface;
|
||||
|
||||
class Utils
|
||||
{
|
||||
function sendJson(ConnectionInterface $conn, string $head, string $jsonData): void
|
||||
{
|
||||
$conn->send("HTTP/1.1 {$head}\r\nContent-Type: application/json\r\n\r\n{$jsonData}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user