. */ namespace SP\Util; /** * Class ConnectionInterface * * @package SP\Util */ interface ConnectionInterface { public const TYPE_TCP = 1; public const TYPE_UDP = 2; public const SOCKET_TIMEOUT = 10; /** * Obtener un socket * * @return resource */ public function getSocket(int $type); /** * Cerrar un socket */ public function closeSocket(); /** * Obtener el último error del socket */ public function getSocketError(): string; /** * Enviar un mensaje al socket */ public function send(string $message); }