通过GPRS发送UDP [英] Sending UDP Over GPRS

查看:99
本文介绍了通过GPRS发送UDP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将UDP数据报从我的移动设备发送到互联网主机。我在Windows Mobile 6上使用Compact Framework 3.5。在尝试发送数据报之前,我已经实现了连接管理器,但我仍然没有在主机上看到任何数据,也没有在我的应用程序中抛出任何异常。任何人都可以提供我可能做错了或丢失的信息吗?

字符串url =" *。*。*。*" ;;
bool res = GPRSConnection.Setup(" http://" + url +" /");
if if(res)
{
UdpClient client = new UdpClient();
client.Connect(new IPEndPoint(IPAddress.Parse(url),11000));
Byte [] sendBytes = System.Text.Encoding.ASCII.GetBytes(" hello world");
client.Send(sendBytes,sendBytes .Length);
client.Close();
}

解决方案



您可能没有使用公共IP。任何方式都存在同样的问题。如果您仍然遇到同样的问题,请参阅此链接并告诉我们。

http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/bf75de09-a871-49dd-a44b-5e6171c04e47/


< a href ="http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/75ea5520-8729-410d-8c75-731675a2d9c8/"> http://social.msdn.microsoft.com/论坛/ EN-US / windowsmobiledev /线程/ 75ea5520-8729-410d-8c75-731675a2d9c8 /


问候,
Malleswar

I am trying to send out UDP datagrams from my mobile device to an internet host. I am using Compact Framework 3.5 on Windows Mobile 6. I have implemented the connection manager before I attempt to send the datagrams but I still never see any data on the host and don't throw any exceptions in my app. Can anyone provide information on what I may be doing wrong or missing?

string url = "*.*.*.*";
bool res = GPRSConnection.Setup("http://" + url + "/");
if (res)
{
                UdpClient client = new UdpClient();
                client.Connect(new IPEndPoint(IPAddress.Parse(url), 11000));
                Byte[] sendBytes = System.Text.Encoding.ASCII.GetBytes("hello world");
                client.Send(sendBytes, sendBytes.Length);
                client.Close();
}

解决方案

Hi,

You may not be using public IP. Any way the same kind of problems are here. Please refer to this links and let us know if you still face the same problem.


http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/bf75de09-a871-49dd-a44b-5e6171c04e47/


http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/75ea5520-8729-410d-8c75-731675a2d9c8/


Regards,
Malleswar


这篇关于通过GPRS发送UDP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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