Click here to Skip to main content
12,242,449 members (57,407 online)
Click here to Skip to main content

Stats

359.1K views
36.1K downloads
201 bookmarked
Posted

A TCP/IP Server written in C#

, 29 Dec 2003 CPOL
TCP/IP Server, which is running as a Windows Service waiting for client requests
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;

namespace TCPService
{
	/// <summary>
	/// Summary description for TCPInstaller.
	/// </summary>
	[RunInstaller(true)]
	public class TCPInstaller : System.Configuration.Install.Installer
	{
		private System.ServiceProcess.ServiceProcessInstaller TCPServiceProcessInstaller;
		private System.ServiceProcess.ServiceInstaller TCPServiceInstaller;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public TCPInstaller()
		{
			// This call is required by the Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitializeComponent call
		}

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}


		#region Component Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.TCPServiceProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller();
			this.TCPServiceInstaller = new System.ServiceProcess.ServiceInstaller();
			// 
			// TCPServiceProcessInstaller
			// 
			this.TCPServiceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
			this.TCPServiceProcessInstaller.Password = null;
			this.TCPServiceProcessInstaller.Username = null;
			// 
			// TCPServiceInstaller
			// 
			this.TCPServiceInstaller.DisplayName = "TCP";
			this.TCPServiceInstaller.ServiceName = "TCPService";
			// 
			// TCPInstaller
			// 
			this.Installers.AddRange(new System.Configuration.Install.Installer[] {
																					  this.TCPServiceProcessInstaller,
																					  this.TCPServiceInstaller});

		}
		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Fact Pandit
Web Developer
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 30 Dec 2003
Article Copyright 2003 by Fact Pandit
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid