simplified sending responese

This commit is contained in:
GitProtogen
2026-03-05 12:51:43 +01:00
parent 515d061cae
commit e56169b299
7 changed files with 87 additions and 7 deletions
+13
View File
@@ -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}");
}
}