linux howto - fabio de lorenzo personal informations and experiences Forum Index linux howto - fabio de lorenzo personal informations and experiences
kernel modules and software
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

implementazione di host is Alive, passaggio di funzione

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    linux howto - fabio de lorenzo personal informations and experiences Forum Index -> macromedia flash programming
View previous topic :: View next topic  
Author Message
flash_fabio
Guest





PostPosted: Fri Apr 29, 2005 3:54 pm    Post subject: implementazione di host is Alive, passaggio di funzione Reply with quote

isAlive("192.168.150.3","9191",myFun,"gino");

function myFun(res,par) {
trace ("-->par="+par);
trace ("-->res="+res);
}

/*
* isAlive guarda se un host è up e la sua porta in listening
* il risulato è passato alla funzione myFun come primo parametro,
* l'ultimo parametro, viene passato alla funzione myFun
* come secondo parametro
*/
function isAlive(ip,port,templateFunc,parametro ) {

function iaOnConnect(success) {
if (success) templateFunc("HOST raggiunto",parametro);
else templateFunc("HOST irraggiungibile",parametro);
}
socket = new XMLSocket();
socket.onConnect = iaOnConnect;
socket.connect(ip,port);
}
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    linux howto - fabio de lorenzo personal informations and experiences Forum Index -> macromedia flash programming All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group