通过计算机上的不同IP端口进行不同的处理 [英] different process through different IP port on the computer

查看:98
本文介绍了通过计算机上的不同IP端口进行不同的处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用C#开发了一个应用程序。

EXE应用程序调用web服务。

我希望在计算机上运行很多进程,并通过不同的网卡运行不同的进程当时的IP端口。

例如:

我的应用程序名称是a.EXE

计算机有4个网卡端口。 />
每个网卡都有不同的IP地址,所有网卡都可以访问webserice。



我运行a.EXE 4次。

1st a.EXE通过IP 1端口访问网络服务

2nd a.EXE通过IP 2端口访问网络服务

3rd a.EXE through IP 3端口访问网络服务

4th a.EXE通过IP 4端口访问网络服务





我不知道如何设置a.EXE

谁可以给我一些建议。

谢谢。

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.

推荐答案

首先,您不能使用端口1到4.端口号不是完全仲裁的拉里,其中很多是保留的。他们的最终权威是IANA( http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority [ ^ ]);并在此处维护端口分配: http:// www。 iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml [ ^ ]。



程序,端口号用于服务器部分。在客户端部分,服务器部分的IP端口用于连接。对于HTTP,可以将其指定为服务器URI的一部分: http://en.wikipedia.org/wiki/URI_scheme [ ^ ]。



-SA
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


这篇关于通过计算机上的不同IP端口进行不同的处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆