コード例 #1
0
        /// <summary>
        /// Gets an <seealso cref="Channel"/> abstraction wrapper using the <seealso cref="OutboundSocket"/> instance.
        /// </summary>
        /// <param name="eventSocket">The <seealso cref="OutboundSocket"/> instance to use.</param>
        /// <returns>A Task of <seealso cref="Channel"/>.</returns>
        public static async Task <Channel> GetChannel(this OutboundSocket eventSocket)
        {
            await eventSocket.Connect().ConfigureAwait(false);

            return(new Channel(eventSocket));
        }
コード例 #2
0
 /// <summary>
 /// Disable socket lingering. See <see cref="Linger"/> above
 /// </summary>
 /// <remarks>
 /// See https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-nolinger
 /// </remarks>
 /// <param name="eventSocket">The <seealso cref="OutboundSocket"/> instance to execute on.</param>
 /// <returns>A Task of <seealso cref="CommandReply"/></returns>
 public static Task <CommandReply> NoLinger(this OutboundSocket eventSocket)
 {
     return(eventSocket.SendCommand("nolinger"));
 }