Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > Italian Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

db2000 ping

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-03-2009, 02:52 PM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post db2000 ping

db2000 ping




db2000 ping.dll è una piccola libreria con solo tre semplici funzioni:
  • IP per "pingare" un'indirizzo ip
  • HOST per "pingare" un host con il suo nome o url
  • getHOSTIP restituisce l'ip di un host una volta che ne è stato indicato il nome o l'url
Attached Files
File Type: zip db2000 ping (CF1).zip (167.8 KB, 88 views)
File Type: zip db2000 ping (CF2).zip (20.5 KB, 88 views)

Last edited by maXim : 02-04-2009 at 04:25 PM. Reason: new versions
Reply With Quote
  #2 (permalink)  
Old 02-03-2009, 05:47 PM
giannimaione's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Naples, Italy
Posts: 244
Send a message via Skype™ to giannimaione
Awards Showcase
Beta Tester 
Total Awards: 1
Default indirizzo ip

ciao Max,

ottima lib;
puoi implementare una funzione che ti restituisce l'ip locale e l'ip assegnato dal provider internet?

in questo momento l'ip del mio pc(locale) e' : 192.168.1.4 , mentre l'ip internet 79.22.138.124

un saluto,
__________________
Gianni
Reply With Quote
  #3 (permalink)  
Old 02-03-2009, 06:51 PM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

Ciao Gianni,

che bello ritrovarti da queste parti ...

A proposito della mia nuova DLL ti informo che per rilevare l'IP locale è sufficiente utilizzare la funzione getHOSTIP passando come parametro il nome del PC (quello utilizzato in rete), mentre per rilevare l'IP pubblico puoi integrare quanto avevo già pubblicato nel thread Get External IP (public IP). Quest'ultimo è quello che assegna il provider da non confondere con il risultato della funzione getHOSTIP che risolve appunto l'IP dell'HOST.

Alla prossima...

Massimo
Reply With Quote
  #4 (permalink)  
Old 02-04-2009, 10:31 AM
Junior Member
 
Join Date: Nov 2008
Location: LT-40Km , Italia
Posts: 29
Default

Grazie
Si e' quello che cercavo , pero' sia su Acer n311 wm5 ,hp ipaq wm6 mi da questo errore.
Attached Images
File Type: jpg errore p.jpg (19.6 KB, 17 views)
Reply With Quote
  #5 (permalink)  
Old 02-04-2009, 04:38 PM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

Ciao Alessandro,

ho ricompilato e ripubblicato la libreria in due diverse versioni che rappresentano altrettante modalità operative sia in ambiente CF1 che CF2. Fammi sapere...
Reply With Quote
  #6 (permalink)  
Old 02-05-2009, 07:59 AM
Junior Member
 
Join Date: Nov 2008
Location: LT-40Km , Italia
Posts: 29
Default

Ciao maXim ,
inanzitutto grazie dell'aiuto che mi stai dando con questa libreria.
Queste sono le prove effettuate:
prove effettuate su emulatore wm6

db2000 ping (CF2)\device 1.0.2.2
ping IP KO (non funziona)
PING HOST KO (non funziona)
get HOST IP (torna IP OK)
--------------------------------
db2000 ping (CF2)\device 1.0.2.1
ping IP OK (funziona)
PING HOST OK (funziona)
get HOST IP (torna IP OK)

++++++++++++++++++++++++++++++++
db2000 ping (CF1)\device 1.0.2.2
ping IP KO (non funziona)
PING HOST KO (non funziona)
get HOST IP (torna IP OK)
--------------------------------
db2000 ping (CF1)\device 1.0.2.1
ping IP OK (funziona)
PING HOST OK (funziona)
get HOST IP (torna IP OK)

da come si nota funzionano le versioni 1.0.2.1 sia CF1 che CF2 .
Io sul form ho aggiunto anche il controllo NumUpDown in modo da passare anche il tempo di Timeout.
Ho notato che mettendo il tempo di timeout a 1 oppure a 0 funziona comunque( e' normale che funziona anche con il timeout a 0 ?)

Se non ti crea problemi e' possibile avere come ritorno anche il tempo trascorso dall'invio al ritorno del pacchetto.

Grazie.
Reply With Quote
  #7 (permalink)  
Old 02-05-2009, 11:52 AM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

Ciao alessandro,

Quote:
Ho notato che mettendo il tempo di timeout a 1 oppure a 0 funziona comunque (e' normale che funziona anche con il timeout a 0 ?)
si, funziona anche con il timeout a 0, esegue il ping e ritorna con il primo risultato attendibile...

Quote:
Se non ti crea problemi e' possibile avere come ritorno anche il tempo trascorso dall'invio al ritorno del pacchetto.
ti propongo la soluzione che ho adottato momentaneamente e che troverai nel file qui sotto allegato dove ho utilizzato la funzione GetTickCount dell'ottima libreria dzHW di Dimitris Zacharakis, prossimamente (quando avrò più tempo a disposizione) vedrò di integrare in db2000 ping anche questa possibilità.
Attached Files
File Type: sbp db2000 ping test (2).sbp (6.0 KB, 24 views)
Reply With Quote
  #8 (permalink)  
Old 01-15-2011, 05:25 PM
matahari's Avatar
Newbie
 
Join Date: May 2010
Location: Northern Germany
Posts: 8
Default Free or not?

Hello,
sorry for replying this old thread - but:
can i use this dll in my own products? (maybe 1 will be commercial)

thanks
matthias
Reply With Quote
  #9 (permalink)  
Old 01-17-2011, 10:02 AM
maXim's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Sesto Fiorentino - Florence (Italy)
Posts: 224
Send a message via MSN to maXim Send a message via Skype™ to maXim
Awards Showcase
Beta Tester 
Total Awards: 1
Post

Hi matahari,

You can freely use this library provided it is mentioned the product name and author name both within your program and any other support (paper, electronic documents, etc.).
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
function ping alessandro Questions (Windows Mobile) 9 01-16-2011 08:34 PM
db2000 - INI maXim Italian Forum 16 11-07-2010 04:37 AM
ping server alessandro Italian Forum 1 02-03-2009 02:57 PM
db2000 - GPS(c) maXim Italian Forum 2 05-29-2007 06:10 AM
db2000 - RCC maXim Italian Forum 4 05-26-2007 08:32 AM


All times are GMT. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0