Example #1
0
		/// <summary>
		/// Object initializer.
		/// </summary>
		/// <param name="btService">Main service object.</param>
		/// <param name="clientSocket">The instance of client socket.</param>
		public SocketState(BugTrapService btService, Socket clientSocket)
		{
			this.btService = btService;
			this.clientSocket = clientSocket;
			this.readBuffer = new byte[1024];
			string tempFileName = Path.Combine(Path.GetTempPath(), Path.GetTempFileName());
			this.tempStream = new FileStream(tempFileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 1024, FileOptions.DeleteOnClose);
		}
Example #2
0
        /// <summary>
        /// Object initializer.
        /// </summary>
        /// <param name="btService">Main service object.</param>
        /// <param name="clientSocket">The instance of client socket.</param>
        public SocketState(BugTrapService btService, Socket clientSocket)
        {
            this.btService    = btService;
            this.clientSocket = clientSocket;
            this.readBuffer   = new byte[1024];
            string tempFileName = Path.Combine(Path.GetTempPath(), Path.GetTempFileName());

            this.tempStream = new FileStream(tempFileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 1024, FileOptions.DeleteOnClose);
        }