예제 #1
0
        /// <summary>
        /// Initialize the background processing for all the UDT threads.
        /// </summary>
        static UDTSocket()
        {
#if !NO_UDT_CONNECTION
            AppDomain.CurrentDomain.ProcessExit += new EventHandler(CurrentDomain_ProcessExit);

            // Set the callbacks
            udtEndSendCallback = new EndOperationHandler(UDTEndSendCallback);
            GC.KeepAlive(udtEndSendCallback);
            API_SetUDTEndSendCallback(udtEndSendCallback);

            // Start the processor
            _processor.Start();

            // Main select thread
            _udtThreadProcessing = new Thread(new ThreadStart(UDTThreadProcessing));
            _udtThreadProcessing.IsBackground = true;
            _udtThreadProcessing.Name         = "UDTThread Select Processing";
            _udtThreadProcessing.Start();
#endif
        }
예제 #2
0
		/// <summary>
		/// Initialize the background processing for all the UDT threads.
		/// </summary>
		static UDTSocket()
		{
#if !NO_UDT_CONNECTION
			AppDomain.CurrentDomain.ProcessExit += new EventHandler(CurrentDomain_ProcessExit);

			// Set the callbacks
			udtEndSendCallback = new EndOperationHandler(UDTEndSendCallback);
			GC.KeepAlive(udtEndSendCallback);
			API_SetUDTEndSendCallback(udtEndSendCallback);

			// Start the processor
			_processor.Start();

			// Main select thread
			_udtThreadProcessing = new Thread(new ThreadStart(UDTThreadProcessing));
			_udtThreadProcessing.IsBackground = true;
			_udtThreadProcessing.Name = "UDTThread Select Processing";
			_udtThreadProcessing.Start();
#endif
		}
예제 #3
0
 private static extern int API_SetUDTEndSendCallback([MarshalAs(UnmanagedType.FunctionPtr)] EndOperationHandler callback);