Think\Log\Driver\Socket::send PHP Метод

send() защищенный Метод

protected send ( string $host, string $message = '', string $address = '/' ) : boolean
$host string - $host of socket server
$message string - 发送的消息
$address string - 地址
Результат boolean
    protected function send($host, $message = '', $address = '/')
    {
        $url = 'http://' . $host . ':' . $this->port . $address;
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $message);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $headers = ["Content-Type: application/json;charset=UTF-8"];
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        //设置header
        return curl_exec($ch);
    }