/// Create a new RTSP client for a given remote service.
Create a new RTSP client for a given remote service.
Create a new RTSP client for a given remote service .
pub fn new(host: &str, port: u16) -> Result<Client> {
        let address        = try!(utils::get_socket_address((host, port)));
        let stream         = try!(TcpStream::connect(&address));
        let client = Client {
            parser: ResponseParser::new(4096, 256),
            stream: stream,
            host:   host.to_string(),
            port:   port,
            buffer: Vec::new(),
            offset: 0
        };
        Ok(client)
    }
pub fn new ( host : & str , port : u16 ) -> Result < Client > { let address = try ! ( utils get_socket_address ( ( host port ) ) ) ; let stream = try ! ( TcpStream connect ( address ) ) ; let client = Client { parser : ResponseParser :: new ( 4096 , 256 ) , stream : stream , host : host . to_string ( ) , port : port , buffer : Vec :: new ( ) , offset : 0 } ; Ok ( client ) }
Create a new RTSP client for a given remote service.
Create a new RTSP client for a given remote service .
host
&str
port
u16