/// <summary>
 /// Sends the specified SOCKS5 reply to the connected client.
 /// </summary>
 /// <param name="reply">The SOCKS5 reply to send to the connected
 /// client.</param>
 /// <exception cref="ArgumentNullException">The reply parameter is
 /// null.</exception>
 /// <exception cref="ObjectDisposedException">The object has been
 /// disposed.</exception>
 public async Task Reply(SocksReply reply)
 {
     reply.ThrowIfNull("reply");
     AssertValid();
     var bytes = reply.Serialize();
     await stream.WriteAsync(bytes, 0, bytes.Length);
 }
示例#2
0
        /// <summary>
        /// Sends the specified SOCKS5 reply to the connected client.
        /// </summary>
        /// <param name="reply">The SOCKS5 reply to send to the connected
        /// client.</param>
        /// <exception cref="ArgumentNullException">The reply parameter is
        /// null.</exception>
        /// <exception cref="ObjectDisposedException">The object has been
        /// disposed.</exception>
        public void Reply(SocksReply reply)
        {
            reply.ThrowIfNull("reply");
            AssertValid();
            var bytes = reply.Serialize();

            stream.Write(bytes, 0, bytes.Length);
        }
示例#3
0
		/// <summary>
		/// Sends the specified SOCKS5 reply to the connected client.
		/// </summary>
		/// <param name="reply">The SOCKS5 reply to send to the connected
		/// client.</param>
		/// <exception cref="ArgumentNullException">The reply parameter is
		/// null.</exception>
		/// <exception cref="ObjectDisposedException">The object has been
		/// disposed.</exception>
		public void Reply(SocksReply reply) {
			reply.ThrowIfNull("reply");
			AssertValid();
			var bytes = reply.Serialize();
			stream.Write(bytes, 0, bytes.Length);
		}