function ping

alessandro

Member
Licensed User
:sign0085:

Hi,
Is it possible to implement the ping?
I need to use this feature mandatory.
Thank you

:sign0085:
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The full .Net Framework does have a Ping class which can be used with the Door library or a library. However the Compact Framework (device framework) doesn't support it.

Edit: Maybe it is possible to convert this project CodeProject: C# Ping Component. Free source code and programming help into a .Net CF project. I see that the Icmp protocol is supported by .Net CF.
 

alessandro

Member
Licensed User
Hi, Erel

Help my,
I found pingclass.dll this work to win32 but not ppc.
I know only vb6.
can you help my
Tanks.
 

alessandro

Member
Licensed User
Hi, agraham
not work on PPC (wm6) :sign0085:


Error with exceptions2.dll
FullName:
System.Net.Sockets.SocketException

InnerFullName:
InnerMessage:
Stacktrace:in
System.Net.Sockets.Socket.SetSocketOption
 

Attachments

  • errore ping wm6.jpg
    errore ping wm6.jpg
    18.9 KB · Views: 259
Last edited:

agraham

Expert
Licensed User
Longtime User
Well that was a frustrating hour or so :( I wanted to use a receive timeout that is listed as being available for both the Compact and full Frameworks and I couldn't understand why it wouldn't work :confused: Eventually by Googling I found the most stupid comment that I have seen (so far!) from a Microsofty who worked on the socket code

"The Compact Framework supports it but the underlying OS doesn't and throws an error- I hope that makes it clear" :sign0137:

Try this next attempt, seems to work OK on my WM6.1 iPAQ 214.
 

Attachments

  • Ping1.1.zip
    6.3 KB · Views: 514

alessandro

Member
Licensed User
Hi , agraham

It runs on acer n311 WM5 and hp ipaq 214 wm6 .
There is only one small problem::
1 Ping ipaddress 192.168.1.4 ping running time "20 seconds" ,( msg ping Reply from192.168.1.4 in 21 ms.)
2 Ping ipaddress 192.168.1.4 ping running time "20 seconds" ,( msg ping Reply from192.168.1.4 in 7 ms.)
3 Ping ipaddress 192.168.1.4 ping running time "20 seconds" ,( msg ping Reply from192.168.1.4 in 15 ms.)
......

1 Ping hostname pc01ping running time "20 seconds" ,( msg ping Reply from192.168.1.4 in 21 ms.)
2 Ping hostname pc01 ping running time "0.1 seconds" ,( msg ping Reply from192.168.1.4 in 7 ms.)
3 Ping hostname pc01 ping running time "0.1 seconds" ,( msg ping Reply from192.168.1.4 in 15 ms.)

Regards
 

agraham

Expert
Licensed User
Longtime User
It runs on acer n311 WM5 and hp ipaq 214 wm6 .
There is only one small problem::
1 Ping ipaddress 192.168.1.4 ping running time "20 seconds" ,( msg ping Reply from192.168.1.4 in 21 ms.)
I don't understand the problem. What is "running time", that doesn't come from the library. :confused: It works fine on my iPAQ 214 and my HTC Diamond.
 
Top