Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I develped a application by C#.
the EXE application call a webservice.
and i want to run many processes on the computer and different process through different network card IP port at that time.
For example:
my application name is a.EXE
the computer has 4 network card ports.
each network card has different IP address, all of network card can access the webserice.

I run a.EXE 4 times.
1st a.EXE through IP 1 port to access the webservice
2nd a.EXE through IP 2 port to access the webservice
3rd a.EXE through IP 3 port to access the webservice
4th a.EXE through IP 4 port to access the webservice


I have no idea how to set the a.EXE
who can give me some suggestion.
thanks.
Posted

1 solution

First of all, you cannot use ports 1 to 4. Port numbers are not completely arbitrary, many of them are reserved. The ultimate authority for them is IANA (http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority[^]); and the port assignments are maintained here: http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml[^].

In a program, the port number is used on the server part. On client part, the IP port of the server part is used for connection. For HTTP, it can be specified as the part of the server URI: http://en.wikipedia.org/wiki/URI_scheme[^].

—SA
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900