1
0
Fork 0
php-language-server/src/ProtocolStreamWriter.php

29 lines
479 B
PHP
Raw Normal View History

2016-08-25 13:27:14 +00:00
<?php
declare(strict_types = 1);
namespace LanguageServer;
class ProtocolStreamWriter implements ProtocolWriter
{
private $output;
/**
* @param resource $output
*/
public function __construct($output)
{
$this->output = $output;
}
/**
* Sends a Message to the client
*
* @param Message $msg
* @return void
*/
private function write(Message $msg)
{
fwrite($this->output, (string)$msg);
}
}