Esempio n. 1
0
        /// <summary>
        /// Send the specified web resource.
        /// </summary>
        public void Send(WebResource resource, HttpSendOptions options = null, IAction onSent = null)
        {
            Log.Info("Sending web resource " + resource + " bytes to client " + this + ".");

            // get the resource stream then prepare to send the resource stream data
            resource.GetStream(ActionSet.New(SendResource, (Stream)null, (Lock)null, resource, options, onSent));
        }
Esempio n. 2
0
        /// <summary>
        /// Send the specified web resource.
        /// </summary>
        public void Send(WebResource resource, TransportOptions options = null, IAction onSent = null)
        {
            // is disposed?
            if (_disposed)
            {
                Log.Warning("Cannot send from disposed connection.");
                return;
            }

            // get the resource stream then prepare to send the resource stream data
            resource.GetStream(ActionSet.New(SendResource, (Stream)null, (Lock)null, resource, options, onSent));
        }