<?php


class ServerStartUp
{
    public $port = 0;
    public $rtsp_port = 0;

    public $hls_port = 0;
    
    public $rtmp_threadPoolSize = 0;
    public $rtmp_maxSocket = 0;
    
    public $rtsp_threadPoolSize = 0;
    public $rtsp_maxSocket = 0;
    
    public $receiveMessageSize = 0;
    public $receiveBufferSize = 0;
    public $sendBufferSize = 0;

    public function toJson()
    {
        return json_encode($this);
    }

    public function fromJson($json_obj)
    {
        $this->port = $json_obj['port'];
        $this->hls_port = $json_obj['hls_port'];
        $this->rtsp_port = $json_obj['rtsp_port'];
        $this->rtmp_threadPoolSize = $json_obj['rtmp_threadPoolSize'];
        $this->rtmp_maxSocket = $json_obj['rtmp_maxSocket'];
        $this->rtsp_threadPoolSize = $json_obj['rtsp_threadPoolSize'];
        $this->rtsp_maxSocket = $json_obj['rtsp_maxSocket'];
        $this->receiveMessageSize = $json_obj['receiveMessageSize'];
        $this->receiveBufferSize = $json_obj['receiveBufferSize'];
        $this->sendBufferSize = $json_obj['sendBufferSize'];
    }

}