473,698 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Create Mutiple Instance of a Single EXE??

Hi,

My Application listening to a port of my machine and
it response with data to the requesting system. This
application is provided as a service in my machine.
Now i am planning to have more than one instance of
this application listening to the input request.How
sholuld create multiple instance of the application.Is is
possible to have same port for listening for all the
instances.

Thanks in advance,
Varadha
Nov 16 '05 #1
1 1308
FJM
"varadha" <va*******@redi ffmail.com> wrote in message
news:47******** *************** *****@phx.gbl.. .
My Application listening to a port of my machine and
it response with data to the requesting system. This
application is provided as a service in my machine.
Now i am planning to have more than one instance of
this application listening to the input request.How
sholuld create multiple instance of the application.Is is
possible to have same port for listening for all the
instances.

I don't think this is what you want to do - because if you have two
executables you will have two bind calls and the second one will fail
because the port is in use.

What you want to do is multi thread your application like this (paramaters
not included)

bind();
while (1){
i = accept();
if (i >0)
spawn_thread_to _handle_request (i);
}

This way - as soon as a request comes into your server - a new thread will
be spawned to handle the request - and the loop will spin around again to
the blocking accept() call and hang there waiting for another request.

Hope this clarifies things for you.
Varadha

FJM..
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1953
by: underground | last post by:
I need a little help figuring this one out. I have a script that I've modified to post mutiple binary files into a single row but instead of copying the indiviuals files it rewrites the first file to all the other columns in the row... Could someone help me with this . Below is the complete script...and form.. <?php if(isset($_POST) && $_FILES && $_FILES && $_FILES && $_FILES && $_FILES && $_FILES && $_FILES > 0) { $fileName = $_FILES;...
4
12437
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
2
2025
by: whitethomas12 | last post by:
Hi, I currently have some basic code that allows me to run the tracert command through VB.NET and it also updates my database based on the results. I was wondering if someone can help me find a way that I can used my code to run tracert on mutiple instances at the same time. The following is my current code.
6
2166
by: dewraj | last post by:
Hi I am using windows applicaiton(.net) as front end, and I want to get mutiple tables in Dataset by executing a single stored procedure i.e. SP would return mutiple tables (record sets) with the user specified name. can anybody guide me no this? thanks.
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.