如何定义发件人IP地址? [英] How to define sender IP address?

查看:154
本文介绍了如何定义发件人IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

各位大家好,


是否有人知道如何在C#中设置发件人IP地址。

我想将UDP数据包发送到服务器并使用不同的IP地址模拟不同的计算机

。服务器总是期望UDP数据包中有不同的IP

地址。所以我需要设置发件人的可能性

IP。

希望有人知道这个话题。


非常感谢!

问候Marcel

Hello everybody,

is there anybody who knows how to set a sender IP address in C#.
I want to send UDP packets to a server and simulate different computers
with different IP addresses. The server always expects a different IP
address in the UDP packet. So I need a possibility to set the sender
IP.
Hopefully anybody knows something about this topic.

Thanks a lot!
Greeting Marcel

推荐答案



" Marcel Bode" ; < MB ***** @ freenet.de>在消息中写道

news:11 ********************** @ g43g2000cwa.googlegr oups.com ...
Hi,
"Marcel Bode" <mb*****@freenet.de> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
大家好,

是否有人知道如何在C#中设置发件人IP地址。
我想将UDP数据包发送到服务器并模拟不同的计算机使用不同的IP地址。服务器总是期望UDP数据包中有不同的IP地址。所以我需要有可能设置发送者
IP。
希望有人知道这个话题。
Hello everybody,

is there anybody who knows how to set a sender IP address in C#.
I want to send UDP packets to a server and simulate different computers
with different IP addresses. The server always expects a different IP
address in the UDP packet. So I need a possibility to set the sender
IP.
Hopefully anybody knows something about this topic.



你确实意识到你不会得到任何回复服务器对吗?


响应包将被发送到具有该IP地址的机器。


如果你指定了更好的建议将不同的IP发送到您当地的

计算机,然后在创建本地

IPEndPoint时从这些IP中选择。


-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通局


You do realise thhat you will not get any response from the server right?

The response packages will be send to the machine with that IP address.

A better suggestion would be if you assign differents IPs to your local
computer and then select from these IPs when you create your local
IPEndPoint.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation





我认为你的建议,是正确的方法,但我试图模拟

5000不同的计算机与5000不同的IP地址.....嗯我好

认为这不容易


但是非常感谢!


Marcel

Hi,

I think your suggestion, is the correct way but I am trying to simulate
5000 different computer with 5000 different IP addresses.....hmmm I
think it''s not easy

But thanks a lot!

Marcel




" Ma rcel Bode < MB ***** @ freenet.de>在消息中写道

news:11 ********************* @ g14g2000cwa.googlegro ups.com ...
Hi,
"Marcel Bode" <mb*****@freenet.de> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...


我认为你的建议,是正确的方法,但我试图模拟5000个不同的计算机,5000个不同的IP地址.....嗯我
认为这不容易
Hi,

I think your suggestion, is the correct way but I am trying to simulate
5000 different computer with 5000 different IP addresses.....hmmm I
think it''s not easy




首先你想做什么?


为什么你需要5K不同的IP?

-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通局



What is what you want to do in the first place?

Why you need 5K differents IPs?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


这篇关于如何定义发件人IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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