问题从UDP数据包获取RemoteEndPoint [英] Problem gettin a RemoteEndPoint from a UDP packet

查看:148
本文介绍了问题从UDP数据包获取RemoteEndPoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


当我收到数据包时,我需要从我的计算机本地端口收听时收到远程端点。


我正在使用UDP(无连接)所以我只将套接字绑定到我的

localEndPoint,我没有绑定(),Connect()到一个RemoteEndPoint。


我正在使用BeginReceive()来监听和接收连接

异步。


这样我如何获得RemoteEndPoint?


谢谢大家!



Hi guys!

I need to get the remote EndPoint from when I receive packets when
listening in a local port in my computer.

I''m using UDP (connection-less) so I only bind the socket to my
localEndPoint, I do not Bind(), Connect() to a RemoteEndPoint.

I''m using BeginReceive() to listen and receive from connection
Asynchronously.

In this way how do I get the RemoteEndPoint?

Thanks guys!




推荐答案

PH,


你不打电话给某处接受吗?从该调用返回的套接字应该填充RemoteEndPoint,你应该能够从那里获得有关客户端的信息。


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com

" PH" <无**** @ nospam.com>在消息新闻中写道:00b201c642d3
PH,

Don''t you make a call to Accept somewhere? The socket that is returned from that call should have the RemoteEndPoint populated and you should be able to get the information about the client from there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"PH" <no****@nospam.com> wrote in message news:00b201c642d3


03a18ed0


0e01a8c0 @ m1 ...

大家好!



当我在计算机的本地端口收听数据包时收到数据包时,我需要获取远程EndPoint。


我正在使用UDP(无连接)所以我只将套接字绑定到我的localEndPoint,我没有绑定(),连接()到RemoteEndPoint。


我''使用BeginReceive()来异步监听和接收连接。



这样我如何获得RemoteEndPoint?



谢谢大家!






/>


0e01a8c0@m1...
Hi guys!



I need to get the remote EndPoint from when I receive packets when listening in a local port in my computer.

I''m using UDP (connection-less) so I only bind the socket to my localEndPoint, I do not Bind(), Connect() to a RemoteEndPoint.

I''m using BeginReceive() to listen and receive from connection Asynchronously.



In this way how do I get the RemoteEndPoint?



Thanks guys!












这篇关于问题从UDP数据包获取RemoteEndPoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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