Library rtsp
This Real Time Streaming Protocol (RTSP) library implements only a minimal subset of the protocol needed by the current scripts.
Author:
Copyright © Same as Nmap--See https://nmap.org/book/man-legal.html
Source: https://svn.nmap.org/nmap/nselib/rtsp.lua
Functions
- __tostring (self)
Converts the Request to a string
- addHeader (self, header, value)
Adds a RTSP header to the request
- addHeader (self, header, value)
Adds a RTSP header to the request
- close (self)
Closes the RTSP socket with the server
- connect (self)
Connects to the RTSP server
- describe (self, url)
Sends a DESCRIBE request to the server and receives the response
- exch (self, req, request)
Sends a request to the server and receives the response and attempts to retry if either send or receive fails.
- new (self, data)
Creates a new Response instance
- new (self, data)
Creates a new Response instance
- setCSeq (self, cseq)
Sets the RTSP sequence number
- setMethod (self, method)
Sets the RTSP Request method
- setRetries (self, retries)
Sets the number of retries for socket reads
- setTimeout (self, timeout)
Sets the socket connection timeout in ms
Functions
- __tostring (self)
-
Converts the Request to a string
Parameters
- self
Return value:
req string containing the request as a string - addHeader (self, header, value)
-
Adds a RTSP header to the request
Parameters
- self
- header
- string containing the header name
- value
- string containing the header value
- addHeader (self, header, value)
-
Adds a RTSP header to the request
Parameters
- self
- header
- string containing the header name
- value
- string containing the header value
- close (self)
-
Closes the RTSP socket with the server
Parameters
- self
- connect (self)
-
Connects to the RTSP server
Parameters
- self
Return values:
- status true on success, false on failure
- err string containing the error message on failure
- describe (self, url)
-
Sends a DESCRIBE request to the server and receives the response
Parameters
- self
- url
- string containing the RTSP URL
Return values:
- status true on success, false on failure
- response Response instance on success err string containing the error message on failure
- exch (self, req, request)
-
Sends a request to the server and receives the response and attempts to retry if either send or receive fails.
Parameters
- self
- req
- request
- instance of Request
Return values:
- status true on success, false on failure
- response Response instance on success err string containing the error message on failure
- new (self, data)
-
Creates a new Response instance
Parameters
- self
- data
- string containing the unparsed data
- new (self, data)
-
Creates a new Response instance
Parameters
- self
- data
- string containing the unparsed data
- setCSeq (self, cseq)
-
Sets the RTSP sequence number
Parameters
- self
- cseq
- number containing the sequence number
- setMethod (self, method)
-
Sets the RTSP Request method
Parameters
- self
- method
- string containing the RTSP method
- setRetries (self, retries)
-
Sets the number of retries for socket reads
Parameters
- self
- retries
- number containing the number of retries
- setTimeout (self, timeout)
-
Sets the socket connection timeout in ms
Parameters
- self
- timeout
- number containing the timeout in ms