PHP code example of monday-factory / synchronous-socket-client

1. Go to this page and download the library: Download monday-factory/synchronous-socket-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

monday-factory / synchronous-socket-client example snippets


$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();