Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sending a low-level query using sockets? (A confused newbie)

by Thelonius (Priest)
on Mar 01, 2007 at 22:15 UTC ( [id://602794]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $peeraddr = $sock->recv($packet, $maxpacketsize);
    # 2048 should work fine as maxpacketetsize
    
  2. or download this
    if(! defined $sock->connected)
    
  3. or download this
    use IO::Socket;
    $p = IO::Socket::INET->new(PeerAddr => "1.1.1.1:7170", Proto => "udp")
       or die "socket: $!\n";
    if ($p->connected) { print "connect ok\n"}
    if ($p->write("foo")) { print "send ok\n"}
    
  4. or download this
    connect ok
    send ok
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://602794]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found