Exemplo n.º 1
0
 private void StartService()
 {
     //Instantiate new ServiceHost
     host = new ServiceHost(this);
     //Open ServiceHost
     host.Open();
     //Create a ChannelFactory and load the configuration setting
     channelFactory = new ChannelFactory <IQuickReturnTraderChat>
                          ("QuickTraderChatEndpoint");
     channel = channelFactory.CreateChannel();
     //Lets others know that someone new has joined
 }
Exemplo n.º 2
0
        private void StartService()
        {
            //Instantiate new ServiceHost 
            host = new ServiceHost(this);

            //Open ServiceHost
            host.Open();

            //Create a ChannelFactory and load the configuration setting
            channelFactory = new ChannelFactory<IQuickReturnTraderChat>("QuickTraderChatEndpoint");
            channel = channelFactory.CreateChannel();

            channel.Say("Admin", "*** New User " + userID + " Joined ****" + Environment.NewLine);
        }
Exemplo n.º 3
0
        private void StartService()
        {
            //Instantiate new ServiceHost
            host = new ServiceHost(this);

            //Open ServiceHost
            host.Open();

            //Create a ChannelFactory and load the configuration setting
            channelFactory = new ChannelFactory <IQuickReturnTraderChat>("QuickTraderChatEndpoint");
            channel        = channelFactory.CreateChannel();

            channel.Say("Admin", "*** New User " + userID + " Joined ****" + Environment.NewLine);
        }
Exemplo n.º 4
0
        private void StartService()
        {
            //Consider putting the baseAddress in the configuration system
            //and getting it here with AppSettings
            //Uri baseAddress = new Uri(ConfigurationManager.AppSettings["baseAddress"]);
            //binding = new NetPeerTcpBinding("Binding1");

            //Instantiate new ServiceHost
            //host = new ServiceHost(this, baseAddress);
            host = new ServiceHost(typeof(QuickReturnTraderChat.FormMain));

            //host.AddServiceEndpoint(typeof(IQuickReturnTraderChat), binding, baseAddress);

            //Open myServiceHost
            host.Open();

            channelFactory = new ChannelFactory <IQuickReturnTraderChat>("QuickTraderChatEndpoint");
            channel        = channelFactory.CreateChannel();
        }
Exemplo n.º 5
0
        private void StartService()
        {
            //Consider putting the baseAddress in the configuration system
            //and getting it here with AppSettings
            //Uri baseAddress = new Uri(ConfigurationManager.AppSettings["baseAddress"]);
            //binding = new NetPeerTcpBinding("Binding1");

            //Instantiate new ServiceHost 
            //host = new ServiceHost(this, baseAddress);
            host = new ServiceHost(typeof(QuickReturnTraderChat.FormMain));

            //host.AddServiceEndpoint(typeof(IQuickReturnTraderChat), binding, baseAddress);
            
            //Open myServiceHost
            host.Open();

            channelFactory = new ChannelFactory<IQuickReturnTraderChat>("QuickTraderChatEndpoint");
            channel = channelFactory.CreateChannel();
        }
Exemplo n.º 6
0
        private void StartService()
        {
            //Instantiate new ServiceHost
            host = new ServiceHost(this);

            //Set the password
            host.Credentials.Peer.MeshPassword = password;

            //Open ServiceHost
            host.Open();

            //Create a ChannelFactory and load the configuration setting
            channelFactory = new ChannelFactory <IQuickReturnTraderChat>("QuickTraderChatSecurePasswordEndPoint");

            //Set the password for the ChannelFactory
            channelFactory.Credentials.Peer.MeshPassword = password;

            //Create the Channel
            channel = channelFactory.CreateChannel();

            //Lets others know that someone new has joined
            channel.Say("Admin", "*** New User " + userID + " Joined ****" + Environment.NewLine);
        }
Exemplo n.º 7
0
        private void StartService()
        {
            //Instantiate new ServiceHost 
            host = new ServiceHost(this);

            //Set the password
            host.Credentials.Peer.MeshPassword = password;

            //Open ServiceHost
            host.Open();
            
            //Create a ChannelFactory and load the configuration setting
            channelFactory = new ChannelFactory<IQuickReturnTraderChat>("QuickTraderChatSecurePasswordEndPoint");
            
            //Set the password for the ChannelFactory
            channelFactory.Credentials.Peer.MeshPassword = password;
            
            //Create the Channel
            channel = channelFactory.CreateChannel();

            //Lets others know that someone new has joined
            channel.Say("Admin", "*** New User " + userID + " Joined ****" + Environment.NewLine);
        }