namespace AsterNET.FastAGI.Command { /// /// Receives a string of text on a channel.
/// Specify timeout to be the maximum time to wait for input in milliseconds, or /// 0 for infinite.
/// Most channels do not support the reception of text.
/// Returns -1 for failure or 1 for success, and the string in parentheses.
/// Available since Asterisk 1.2. ///
public class ReceiveTextCommand : AGICommand { /// /// The milliseconds to wait for the channel to receive a character. /// private int timeout; /// /// Creates a new ReceiveTextCommand with a default timeout of 0 meaning to wait for ever. /// public ReceiveTextCommand() { this.timeout = 0; } /// /// Creates a new ReceiveTextCommand. /// the milliseconds to wait for the channel to receive the text. /// public ReceiveTextCommand(int timeout) { this.timeout = timeout; } /// /// Get/Set the milliseconds to wait for the channel to receive the text. /// public int Timeout { get { return timeout; } set { this.timeout = value; } } public override string BuildCommand() { return "RECEIVE TEXT " + timeout; } } }