goosesganders has asked for the wisdom of the Perl Monks concerning the following question:
Any help would be greatly appreciated. Thanks in advance.#Create Socket socket(Impact, PF_INET, SOCK_STREAM, getprotobyname('tcp')); #Build the address of connection my $internet_addr = inet_aton("axtcnr") or die "Couldn't convert axtimpact into internet address\n"; my $paddr = sockaddr_in(6540, $internet_addr); #Connect connect(Impact,$paddr)or die "Couldn't conne +ct to axtimpact:6540 \n"; select ((select(Impact) , $| = 1)[0]); #enable command buffering if($msg =~ m{(\013.*\034\015)}smx){ print Impact $1; } shutdown(Impact,1); #read the remote answer my $server_message = do { local $/; <Impact>}; # get the response print "recieved: $server_message\n"; #Terminate the connection when done close(Impact);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Socket buffer issue
by ikegami (Patriarch) on Mar 31, 2011 at 21:21 UTC | |
by goosesganders (Initiate) on Apr 01, 2011 at 02:30 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 06:48 UTC | |
by goosesganders (Initiate) on Apr 01, 2011 at 15:04 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 16:22 UTC | |
|