DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 2 Aug 2007 19:04:20 -0300,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    aboni
          2    Simon Hart


UdpClient.Send() through Router   
Hi!

I'm developing a Client/Server using System.Net.Sockets.UdpClient.
My server app is running in a Windows XP Pro and Works Well.
My client app is running in a iPaq with Windows Mobile 5.0, and works well 
when in the same network that my server.
The problem is that when I put a router between my server and my client, the 
last can't send messages.

My first idea to solve the problem be modify the TTL of socket to 2, but I'm 
don't do it.

I try with this two codes above below:

1 -
UdpClient udp = new UdpClient();
udp.Connect(new IPEndPoint(IPAddress.Parse("192.168.0.8"), 8000));
udp.Client.SetSocketOption(SocketOptionLevel.Socket, 
SocketOptionName.IpTimeToLive, 2);
udp.Send(Encoding.ASCII.GetBytes("Mobile"), 6);

2 -
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 
ProtocolType.Udp);
IPAddress broadcast = IPAddress.Parse("192.168.0.8");
byte[] sendbuf = Encoding.ASCII.GetBytes("Mobile New");
IPEndPoint ep = new IPEndPoint(broadcast, 8000);
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.IpTimeToLive, 
100);
s.SendTo(sendbuf, ep);

The line "udp.Client.SetSocketOption(SocketOptionLevel.Socket, 
SocketOptionName.IpTimeToLive, 2);" does not have any effect.

Anybody know if is really the TTL the problem to communicate through Router.
Observetion: the Router model is ZWA-G120.

Thanks for any,
aboni
andrew@assergs.com
Date:Thu, 2 Aug 2007 19:04:20 -0300   Author:  

RE: UdpClient.Send() through Router   
The router needs to support port forwarding so packets will be forwarded onto 
your server.

-- 
Simon Hart
http://simonrhart.blogspot.com


"aboni" wrote:


> Hi!
> 
> I'm developing a Client/Server using System.Net.Sockets.UdpClient.
> My server app is running in a Windows XP Pro and Works Well.
> My client app is running in a iPaq with Windows Mobile 5.0, and works well 
> when in the same network that my server.
> The problem is that when I put a router between my server and my client, the 
> last can't send messages.
> 
> My first idea to solve the problem be modify the TTL of socket to 2, but I'm 
> don't do it.
> 
> I try with this two codes above below:
> 
> 1 -
> UdpClient udp = new UdpClient();
> udp.Connect(new IPEndPoint(IPAddress.Parse("192.168.0.8"), 8000));
> udp.Client.SetSocketOption(SocketOptionLevel.Socket, 
> SocketOptionName.IpTimeToLive, 2);
> udp.Send(Encoding.ASCII.GetBytes("Mobile"), 6);
> 
> 2 -
> Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 
> ProtocolType.Udp);
> IPAddress broadcast = IPAddress.Parse("192.168.0.8");
> byte[] sendbuf = Encoding.ASCII.GetBytes("Mobile New");
> IPEndPoint ep = new IPEndPoint(broadcast, 8000);
> s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.IpTimeToLive, 
> 100);
> s.SendTo(sendbuf, ep);
> 
> The line "udp.Client.SetSocketOption(SocketOptionLevel.Socket, 
> SocketOptionName.IpTimeToLive, 2);" does not have any effect.
> 
> Anybody know if is really the TTL the problem to communicate through Router.
> Observetion: the Router model is ZWA-G120.
> 
> Thanks for any,
> aboni
> andrew@assergs.com 
> 
> 
> 
Date:Wed, 8 Aug 2007 13:06:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us