monday-factory / synchronous-socket-client
Super simple synchronous socket stream client
v1.0.7
2018-05-25 09:08 UTC
Requires
- php: >= 7.1
README
Super simple synchronous socket stream client
$options = [ 'connectionTimeout' => 30, // Default value 'streamTimeout' => 30, // Default value ]; /** * @throws MondayFactory\SynchronousSocketClient\Exception\ConnectionException */ $connection = MondayFactory\SynchronousSocketClient\Connection::factory('tcp://my.super.server:12345', $options); $response = $connection->sendMessage('{"method": "ping"}'); echo $response; $connection->close();