Connection
Object Hierarchy:
Description:
[ CCode ( has_type_id = false ) ]
[ Compact ]
[ GIR ( name = "RTSPConnection" ) ]
public class Connection
[ Compact ]
[ GIR ( name = "RTSPConnection" ) ]
public class Connection
This object manages the RTSP connection to the server.
It provides function to receive and send bytes and messages.
Namespace: Gst.RTSP
Package: gstreamer-rtsp-1.0
Content:
Static methods:
- public static Result accept (Socket socket, out Connection? conn, Cancellable? cancellable = null)
- public static Result create (Url url, out Connection conn)
- public static Result create_from_socket (Socket socket, string ip, uint16 port, string initial_buffer, out Connection? conn)
Methods:
- public void clear_auth_params ()
Clear the list of authentication directives stored in this.
- public Result close ()
Close the connected this.
- public Result connect (TimeVal timeout)
Attempt to connect to the url of this made with connection_create.
- public Result connect_usec (int64 timeout)
Attempt to connect to the url of this made with connection_create.
- public Result connect_with_response (TimeVal timeout, Message response)
Attempt to connect to the url of this made with connection_create.
- public Result connect_with_response_usec (int64 timeout, Message response)
Attempt to connect to the url of this made with connection_create.
- public Result do_tunnel (Connection? conn2)
If this received the first tunnel connection and
conn2
received the second tunnel connection, link the two connections together so that this manages the tunneled connection. - public Result flush (bool flush)
Start or stop the flushing action on this.
- public Result free ()
Close and free this.
- public bool get_ignore_x_server_reply ()
Get the ignore_x_server_reply value.
- public unowned string get_ip ()
Retrieve the IP address of the other end of this .
- public unowned Socket? get_read_socket ()
Get the file descriptor for reading.
- public bool get_remember_session_id ()
- public unowned TlsConnection get_tls () throws Error
Get the TLS connection of this.
- public TlsDatabase? get_tls_database ()
Gets the anchor certificate authorities database that will be used after a server certificate can't be verified with the default certificate database.
- public TlsInteraction? get_tls_interaction ()
Gets a TlsInteraction object to be used when the connection or certificate database need to interact with the user.
- public TlsCertificateFlags get_tls_validation_flags ()
Gets the TLS validation flags used to verify the peer certificate when a TLS connection is established.
- public unowned string? get_tunnelid ()
Get the tunnel session id the connection.
- public Url get_url ()
Retrieve the URL of the other end of this.
- public unowned Socket? get_write_socket ()
Get the file descriptor for writing.
- public bool is_tunneled ()
Get the tunneling state of the connection.
- public Result next_timeout (TimeVal timeout)
Calculate the next timeout for this, storing the result in
timeout
. - public int64 next_timeout_usec ()
Calculate the next timeout for this
- public Result poll (Event events, out Event revents, TimeVal timeout)
Wait up to the specified
timeout
for the connection to become available for at least one of the operations specified inevents
. - public Result poll_usec (Event events, out Event revents, int64 timeout)
Wait up to the specified
timeout
for the connection to become available for at least one of the operations specified inevents
. - public Result read (uint8[] data, TimeVal timeout)
Attempt to read
data.length
bytes intodata
from the connected this, blocking up to the specifiedtimeout
. - public Result read_usec (uint8[] data, int64 timeout)
Attempt to read
data.length
bytes intodata
from the connected this, blocking up to the specifiedtimeout
. - public Result receive (Message message, TimeVal timeout)
Attempt to read into
message
from the connected this, blocking up to the specifiedtimeout
. - public Result receive_usec (Message message, int64 timeout)
Attempt to read into
message
from the connected this, blocking up to the specifiedtimeout
. - public Result reset_timeout ()
Reset the timeout of this.
- public Result send (Message message, TimeVal timeout)
Attempt to send
message
to the connected this, blocking up to the specifiedtimeout
. - public Result send_messages (Message[] messages, TimeVal timeout)
Attempt to send
messages
to the connected this, blocking up to the specifiedtimeout
. - public Result send_messages_usec (Message[] messages, int64 timeout)
Attempt to send
messages
to the connected this, blocking up to the specifiedtimeout
. - public Result send_usec (Message message, int64 timeout)
Attempt to send
message
to the connected this, blocking up to the specifiedtimeout
. - public void set_accept_certificate_func (owned ConnectionAcceptCertificateFunc func)
Sets a custom accept-certificate function for checking certificates for validity.
- public Result set_auth (AuthMethod method, string user, string pass)
Configure this for authentication mode
method
withuser
andpass
as the user and password respectively. - public void set_auth_param (string param, string value)
Setup this with authentication directives.
- public void set_content_length_limit (uint limit)
Configure this to use the specified Content-Length limit.
- public void set_http_mode (bool enable)
By setting the HTTP mode to
true
the message parsing will support HTTP messages in addition to the RTSP messages. - public void set_ignore_x_server_reply (bool ignore)
Set whether to ignore the x-server-ip-address header reply or not.
- public void set_ip (string ip)
Set the IP address of the server.
- public Result set_proxy (string host, uint port)
Set the proxy host and port.
- public Result set_qos_dscp (uint qos_dscp)
Configure this to use the specified DSCP value.
- public void set_remember_session_id (bool remember)
Sets if the Connection should remember the session id from the last response received and force it onto any further requests.
- public void set_tls_database (TlsDatabase? database)
Sets the anchor certificate authorities database.
- public void set_tls_interaction (TlsInteraction? interaction)
Sets a TlsInteraction object to be used when the connection or certificate database need to interact with the user.
- public bool set_tls_validation_flags (TlsCertificateFlags flags)
Sets the TLS validation flags to be used to verify the peer certificate when a TLS connection is established.
- public void set_tunneled (bool tunneled)
Set the HTTP tunneling state of the connection.
- public Result write (uint8[] data, TimeVal timeout)
Attempt to write
data.length
bytes ofdata
to the connected this, blocking up to the specifiedtimeout
. - public Result write_usec (uint8[] data, int64 timeout)
Attempt to write
data.length
bytes ofdata
to the connected this, blocking up to the specifiedtimeout
.