TcpActivation.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / TcpActivation.cs / 1 / TcpActivation.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel.Activation 
{
    using System; 
    using System.ServiceModel.Channels; 
    using System.ServiceModel;
    using System.Diagnostics; 
    using System.ServiceModel.Activation.Diagnostics;
    using System.ServiceModel.Diagnostics;

    class TcpActivation : ActivationService 
    {
        internal TcpActivation() 
            : base(ListenerConstants.TcpActivationServiceName, Uri.UriSchemeNetTcp) 
        {
        } 

        protected override void OnStart(string[] args)
        {
            try 
            {
                base.OnStart(args); 
            } 
            catch (Exception exception)
            { 
                // Log the error to eventlog.
                ListenerTraceUtility.EventLog.LogEvent(TraceEventType.Error,
                    EventLogCategory.ListenerAdapter,
                    EventLogEventId.ServiceStartFailed, 
                    false,
                    exception.ToString()); 
 
                throw;
            } 
        }

#if DEBUG
        protected override void OnCustomCommand(int command) 
        {
            switch (command) 
            { 
                case (int)CustomCommand.DumpTable:
                    RoutingTable.DumpTables(TransportType.Tcp); 
                    break;
                default:
                    break;
            } 
        }
#endif 
 
    }
} 


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK