so, i would need to use something like $checkport->send(); and get a response from the tftp server to verify the port is listening correct?
thanks -c On Wed, 16 Jan 2002, Bob Showalter wrote: > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 16, 2002 4:01 PM > > To: Perl Discuss > > Subject: verifying if a server is listening on a port > > > > > > i am hoping to use perl to verify whether a remote machine is > > listening on > > UDP/69. i've found some examples, and modified them slightly > > to come up > > with the attached snippet of code. the output always seems to > > be that the > > "port is up". i am imagining that $disconn is never being set to true > > since the $checkport will always at least attempt a connection. > > > > maybe my reasoning to that is incorrect, but i guess, that is > > why i am > > writing :) any help is appreciated. thanks -charles > > connect() on a SOCK_DGRAM (UDP) socket doesn't really "do" anything; > it just caches the address for future calls to send(). > > Since UDP does not guarantee delivery, you have to send a message > and get a response from the server according to some higher-level > protocol. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]