Re: IO::Socket::Multicast::mcast_send

2020-04-05 Thread James Kerwin
A I managed to find the problem thanks to somebody else finding it late last year. With the particular verison of Perl on the Pi (I think I said 5.28) there is a bug for the IO::Socket::Multicast module: https://rt.cpan.org/Public/Bug/Display.html?id=130581 To fix it I went in to where the

Re: IO::Socket::Multicast::mcast_send

2020-04-05 Thread James Kerwin
ter and can directly ping the ip from the laptop and pi. Thanks, James On Sun, Apr 5, 2020 at 4:03 PM Shlomi Fish wrote: > Hi James, > > On Sun, 5 Apr 2020 14:58:26 +0100 > James Kerwin wrote: > > > Hi All, > > > > I'm trying to connect to a smart bulb on my

Re: IO::Socket::Multicast::mcast_send

2020-04-05 Thread Shlomi Fish
Hi James, On Sun, 5 Apr 2020 14:58:26 +0100 James Kerwin wrote: > Hi All, > > I'm trying to connect to a smart bulb on my home WIFI using mcast_send > in IO::Socket::Multicast. > > It works on my main Linux Mint laptop. The same script does not work on my > Rasp

IO::Socket::Multicast::mcast_send

2020-04-05 Thread James Kerwin
Hi All, I'm trying to connect to a smart bulb on my home WIFI using mcast_send in IO::Socket::Multicast. It works on my main Linux Mint laptop. The same script does not work on my Raspberry PI. Despite the script running as expected on one laptop I've checked that this is all set up

Re: IO::Socket

2014-12-29 Thread Brandon McCaig
Mike: On Mon, Dec 29, 2014 at 10:23:00AM -0600, Mike wrote: > Can anyone point me in the direction of more thorough > documentation for the IO::Socket module? Seems like the > documentation on perl.org is pretty limited. At least, it > doesn't feel very thorough

Re: IO::Socket

2014-12-29 Thread Andrew Solomon
This might be a good place to start: https://metacpan.org/pod/Socket On Mon, Dec 29, 2014 at 4:23 PM, Mike wrote: > Can anyone point me in the direction of more thorough documentation for the > IO::Socket module? Seems like the documentation on perl.org is pretty > limited. At least, i

IO::Socket

2014-12-29 Thread Mike
Can anyone point me in the direction of more thorough documentation for the IO::Socket module? Seems like the documentation on perl.org is pretty limited. At least, it doesn't feel very thorough to me. http://perldoc.perl.org/IO/Socket.html For example, what exactly does "timeo

issue with threaded IO::Socket::INET

2013-05-19 Thread Chris Knipe
Hi All, I have an issue with a small piece of code. I am using IO::Socket::INET to accept client connections from an socket, and then hand the connection off to an newly created thread. As soon as an client disconnects (or interrupts the tcp session), the script will exit completely. No errors

IO::Socket::SSL replacement for IO::Socket::INET

2013-04-08 Thread Chris Knipe
Hi All, I've successfully written quite an big perl server using IO::Socket::INET - it seems to be working pretty darn good and so far I'm happy. I'm attempting now to do the same but by using SSL. I've read up on IO::Socket::SSL, and I know that there are minor changes requ

Re: IO::Socket::SSL and SSL_verify_mode

2012-03-21 Thread ml
gt; > 2012/3/21 ml : > > > hello list > > > hello guru of perl > > > hello all > > > > > > > > > I seek to understand how to position the value SSL_verify_mode => 0x00. > > > > > >can you explain how to properly use thi

Re: IO::Socket::SSL and SSL_verify_mode

2012-03-21 Thread ml
understand how to position the value SSL_verify_mode => 0x00. > > > >can you explain how to properly use this parameter in > >IO::Socket::SSL > > > > thank for reply > > > > sincerely > > > > -- > > http://pgp.mit

Re: IO::Socket::SSL and SSL_verify_mode

2012-03-21 Thread Bob goolsby
What was wrong with the answer you received on Perl Monks? 2012/3/21 ml : > hello list > hello guru of perl > hello all > > > I seek to understand how to position the value SSL_verify_mode => 0x00. > >        can you explain how to properly use this parameter

IO::Socket::SSL and SSL_verify_mode

2012-03-21 Thread ml
hello list hello guru of perl hello all I seek to understand how to position the value SSL_verify_mode => 0x00. can you explain how to properly use this parameter in IO::Socket::SSL thank for reply sincerely -- http://pgp.mit.edu:11371/pks/lookup

Re: research for secure tchat client server use IO::Socket::SSL

2012-02-15 Thread ml
to consult the documentation that is different and both PerlMonks different pages that deal with this vast subject. I try to find a minimal example because I want to turn into non securise securise. here is the status of my research #!/usr/bin/perl use warnings; use strict; use IO::Socket::SSL &#

research for secure tchat client server use IO::Socket::SSL

2012-02-15 Thread ml
I want to turn into non securise securise. here is the status of my research #!/usr/bin/perl use warnings; use strict; use IO::Socket::SSL 'inet4'; use threads; use threads::shared; $|++; print "$$ Server started\n"; # do a "top -p -H $$" to monitor server ++

Re: Net::SSLeay with Socket or IO::Socket::SSL

2011-08-02 Thread m...@smtp.fakessh.eu
Le mercredi 3 août 2011 02:12, Uri Guttman a écrit : > >>>>> "mfe" == ml@smtp fakessh eu writes: > > mfe> in the examples of Net::SSLeay, it shows various examples that > mfe> use low-level functions use Socket. what are the differences if > m

Re: Net::SSLeay with Socket or IO::Socket::SSL

2011-08-02 Thread Uri Guttman
>>>>> "mfe" == ml@smtp fakessh eu writes: mfe> in the examples of Net::SSLeay, it shows various examples that mfe> use low-level functions use Socket. what are the differences if mfe> we re writing the examples with IO::Socket::SSL just use IO::Socket

Net::SSLeay with Socket or IO::Socket::SSL

2011-08-02 Thread m...@smtp.fakessh.eu
hi folks hi guru of perl in the examples of Net::SSLeay, it shows various examples that use low-level functions use Socket. what are the differences if we re writing the examples with IO::Socket::SSL all testimonials are welcome --  http://pgp.mit.edu:11371/pks/lookup?op=get&se

IO::Socket::INET and 255.255.255.255

2011-02-18 Thread Brian J. Murrell
If I change the target from 255.255.255.255 to a unicasted address, my perl process does get the response. Here's how I'm creating my socket and sending and receiving: $handle = IO::Socket::INET->new(Proto => 'udp', Broadcast => 1,

Re: IO::Socket operations

2010-09-28 Thread Shlomi Fish
Hi Anand, On Tuesday 28 September 2010 06:52:26 Anand Parthiban wrote: > Dear Team, > > I am a newbie to PERL, See http://perl.org.il/misc.html#pl_vs_pl . > > I was studying about the Socket programming in perl and I was Doing a > Sample Programs using IO::Socket > >

Re: IO::Socket operations

2010-09-28 Thread Jeff Pang
2010/9/28 Anand Parthiban : > my $new_sock = $sock->accept(); > while(<$new_sock>) { > print $_; > } > close($sock); > ### > -- Put them in a forever loop, like: while(1) { my $conn = $sock->accept(); print <$conn>; } etc. You may want to buy the book

IO::Socket operations

2010-09-28 Thread Anand Parthiban
Dear Team, I am a newbie to PERL, I was studying about the Socket programming in perl and I was Doing a Sample Programs using IO::Socket I have Written a Sample Server Client program and it works great, Now, the Problem is that the server is able to listen on Some ports and when the client

Re: POE with IO::Socket

2009-11-02 Thread Brian J. Miller
Someone Something wrote: How about threading? How hard is it? Where can I find a good tutorial? See "Starting Points" on the home page here: http://poe.perl.org/ Also note there is a mailing list specifically for POE related questions where you may get more help. -- Brian J. Miller End Po

Re: POE with IO::Socket

2009-11-01 Thread Someone Something
n #perl on freenode and they directed me to POE. > > Can I implement POE without changing all my code which is based on > > IO::Socket::INET? > > No, you'll have to change pretty much all of it. Some of the "business > logic" layer will survive. > > POE is a r

Re: POE with IO::Socket

2009-11-01 Thread Peter Scott
, I am getting to a point > where I am writing a who() function and I realise that I need receive > while sending. I asked on #perl on freenode and they directed me to POE. > Can I implement POE without changing all my code which is based on > IO::Socket::INET? No, you'll have to c

POE with IO::Socket

2009-10-31 Thread Someone Something
need receive while sending. I asked on #perl on freenode and they directed me to POE. Can I implement POE without changing all my code which is based on IO::Socket::INET? If so, how can I do it? If not, what else can I do?

UDP port scanning with IO::Socket

2009-06-21 Thread Tech W.
Hello, Is it possible to implement an UDP port scanning with IO::Socket? I want to verify a remote UDP port is opened or not. Thanks. Access Yahoo!7 Mail on your mobile. Anytime. Anywhere. Show me how: http://au.mobile.yahoo.com/mail -- To unsubscribe, e-mail: beginners-unsubscr

RE: default timeout for IO::Socket::INET

2009-04-02 Thread Bob McConnell
, but those specs were written in a different age. Bob McConnell -Original Message- From: Jeff Pang [mailto:hostmas...@duxieweb.com] Sent: Thursday, April 02, 2009 8:23 AM To: Chas. Owens Cc: beginners@perl.org Subject: RE: default timeout for IO::Socket::INET oh will be trying to connect to

RE: default timeout for IO::Socket::INET

2009-04-02 Thread Jeff Pang
oh will be trying to connect to the remote host forever until it gets successed? that sounds not reasonable.thanks. > Original Message > Subject: Re: default timeout for IO::Socket::INET > From: "Chas. Owens" > Date: Thu, April 02, 2009 5:19 am > To: J

Re: default timeout for IO::Socket::INET

2009-04-02 Thread Chas. Owens
On Thu, Apr 2, 2009 at 08:11, Jeff Pang wrote: > I checked perldoc documents but didn't find a default timeout value for > IO::Socket::INET object. > Who knows that? thanks. snip Based on my reading of the code it looks like it doesn't timeout by default. -- Chas. Owens w

default timeout for IO::Socket::INET

2009-04-02 Thread Jeff Pang
I checked perldoc documents but didn't find a default timeout value for IO::Socket::INET object. Who knows that? thanks. regards, Jeff. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

get sending ip adres with IO::Socket::INET

2009-03-08 Thread Bernard van de Koppel
Hi, I am trying to setup an netflow monitor with Net::Flow. This is working Oke, with the folowing code: use strict; use Net::Flow qw(decode) ; use IO::Socket::INET; my $receive_port = 9993 ; my $packet = undef ; my $TemplateArrayRef = undef ; my $sock = IO::Socket::INET->new( LocalP

Perl IO::Socket::INET vs. netcat

2009-03-02 Thread Peter Daum
for some reason won't print. I reduced the problem to a tiny test program that basically looks like this: my $out=IO::Socket::INET->new("$ip:$port") or die; my $bs=1024; my ($num_read,$buf); while ($num_read= $in->read($buf,$bs)) { $out->print($buf) or die; } close $ou

eval, ualarm and IO::Socket

2008-10-21 Thread Deviloper
k) then do something else, like looking for signals etc... and then start listening on the socket again. (Or is this a stupid idea anyway?) I ask, because i don´t want to implement a real nonblocking io::socket reader, because this is very though and when reading nonblocking I can´t handle in

Re: IO::Socket::INET client hangs on no server on windoze

2007-05-31 Thread kenTk
it return undef in an orderly > > >fashion? > > >(I have tested it on Linux and it seems to work fine both ways) > > > >use strict; > > >use warnings; > > >use IO::Socket::INET; > > > >sub testSocket > > &g

Re: IO::Socket::INET client hangs on no server on windoze

2007-05-29 Thread kenTk
and it seems to work fine both ways) > > >use strict; > >use warnings; > >use IO::Socket::INET; > > >sub testSocket > >{ > > my $sock; > > my $ok=0; > > unless( $sock=IO::Socket::INET->new(192.168.5.41, > >

IO::Socket::INET client hangs on no server on windoze

2007-05-28 Thread kenTk
stions for making it return undef in an orderly fashion? (I have tested it on Linux and it seems to work fine both ways) use strict; use warnings; use IO::Socket::INET; sub testSocket { my $sock; my $ok=0; unless( $sock=IO::Socket::INET->new(192.168.5.41,

Re: HTTP Post using IO::Socket

2007-02-13 Thread David Moreno Garza
On Mon, 2007-02-12 at 18:30 -0500, Sumit Shah wrote: > All, > > I would appreciate if someone could tell me how to do an HTTP Post using > IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. > > I am new to this and any help would be appreciated. This will s

Re: HTTP Post using IO::Socket

2007-02-13 Thread Sumit Shah
ot;, zentara wrote: On Mon, 12 Feb 2007 18:30:00 -0500, [EMAIL PROTECTED] (Sumit Shah) wrote: All, I would appreciate if someone could tell me how to do an HTTP Post using IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. I am new to this and any help would be apprecia

Re: HTTP Post using IO::Socket

2007-02-13 Thread Sumit Shah
plain sockets. Thanks Sumit Jeff Pang wrote: I would appreciate if someone could tell me how to do an HTTP Post using IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. Post with LWP::UserAgent and HTTP::Request is very convenient since both the modules are current P

Re: HTTP Post using IO::Socket

2007-02-12 Thread Jeff Pang
> >I would appreciate if someone could tell me how to do an HTTP Post using >IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. > Post with LWP::UserAgent and HTTP::Request is very convenient since both the modules are current Perl's builtin modules.Plea

Re: HTTP Post using IO::Socket

2007-02-12 Thread Randal L. Schwartz
>>>>> "Sumit" == Sumit Shah <[EMAIL PROTECTED]> writes: Sumit> I would appreciate if someone could tell me how to do an HTTP Post Sumit> using IO::Socket. I cannot use LWP. I have to manage it with plain Sumit> Sockets. You can *always* use LWP in any sane

HTTP Post using IO::Socket

2007-02-12 Thread Sumit Shah
All, I would appreciate if someone could tell me how to do an HTTP Post using IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. I am new to this and any help would be appreciated. Thanks Sumit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-09 Thread Jen Spinney
On 11/9/06, Oliver J. Morais <[EMAIL PROTECTED]> wrote: * Jen Spinney <[EMAIL PROTECTED]> [061107 18:34]: > while running ethereal/wireshark, it shows me that the TCP checksums > coming from my requests are always incorrect (the IP checksums are > fine). Just a thought: Maybe you're TCP-Checksu

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-09 Thread Oliver J. Morais
* Jen Spinney <[EMAIL PROTECTED]> [061107 18:34]: > while running ethereal/wireshark, it shows me that the TCP checksums > coming from my requests are always incorrect (the IP checksums are > fine). Just a thought: Maybe you're TCP-Checksum-Offloading on the box running ethereal, so you'll never

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-07 Thread Jeff Pang
Hi, If your server is Linux kernel 2.6,then it has a already known bug about the uncorrect checksum. If it's not 2.6 kernel,then you maybe want to use tcpdump for a try.I give most trust to tcpdump than other sniffers. > >Nah, I get incorrect checksums without the \n as well. This may be an >

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-07 Thread Jen Spinney
On 11/7/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > >use strict; >use warnings; > >use IO::Socket; > >my $sock = IO::Socket::INET->new >(PeerAddr => 'www.google.com', > PeerPort => 7, > Proto=> 'tcp') or die &quo

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-07 Thread Jeff Pang
> >use strict; >use warnings; > >use IO::Socket; > >my $sock = IO::Socket::INET->new >(PeerAddr => 'www.google.com', > PeerPort => 7, > Proto=> 'tcp') or die "$!"; > >print $sock "This is a test\n&

Incorrect TCP checksum when printing to IO::Socket object

2006-11-07 Thread Jen Spinney
Hello. If I run the following code: use strict; use warnings; use IO::Socket; my $sock = IO::Socket::INET->new (PeerAddr => 'www.google.com', PeerPort => 7, Proto=> 'tcp') or die "$!"; print $sock "This is a test\n"; close

Re: Zombi children of a IO::Socket::INET server

2006-06-15 Thread Tom Phoenix
On 6/15/06, David Schell <[EMAIL PROTECTED]> wrote: I have a server that receives data from a client through a internet socket. When the connection is established, the server forks a process to deal with the connection. The child then reads data from the connection, does some stuff, responds t

Zombi children of a IO::Socket::INET server

2006-06-15 Thread David Schell
'; my $listen_socket = IO::Socket::INET->new(LocalPort=>8000, Listen=>10, Proto=>'tcp', Reuse=>1); die "Can't create a listening socket: $@&q

Re: IO::Socket squirreliness

2005-08-25 Thread Mason Loring Bliss
On Wed, Aug 24, 2005 at 04:14:15PM -0400, Bob Showalter wrote: > A connect() followed by a close() is just another form of this scenario. You > need to have a client socket in order to detect the peer's closing the > connection. That clarifies things quite nicely. Thank you very much! -- Mason

RE: IO::Socket squirreliness

2005-08-24 Thread Bob Showalter
Bob Showalter wrote: > I don't think there's any problem with IO::Socket. Even if accept > returns a socket, you should receive an EOF on that socket when you > try to read from it, which tells you that the peer has closed the > connection. I think you just need to check f

RE: IO::Socket squirreliness

2005-08-24 Thread Bob Showalter
ing() the > connection? Maybe my assumption is faulty, and there's no implicit > close happening when the initiating process dies. I'll explore this > possibility. > > Hm. No. When the client calls shutdown(2) or close() before the server > calls accept(), the server's $so

Re: IO::Socket squirreliness

2005-08-24 Thread Mason Loring Bliss
ing process dies. I'll explore this possibility. Hm. No. When the client calls shutdown(2) or close() before the server calls accept(), the server's $socket->accept still returns with a socket, and not undef. Am I missing something fundamental here? Is this a bug in IO::Socket? I

IO::Socket squirreliness

2005-08-23 Thread Mason Loring Bliss
to return undef, but it never does. Will someone kindly tell me why this is? Thanks in advance! #!/usr/bin/perl use strict; use warnings; use IO::Select; use IO::Socket; my $socket = IO::Socket::INET->new( "Proto" => "tcp", "LocalPort" =&g

IO::Socket Disconection Detection

2005-04-08 Thread Leip !
then undef will be returned." #!/usr/bin/perl use IO::Socket; use threads; use threads::shared; use strict; use warnings; my $port = 80; my $connected : shared; my $user : shared; my $sender; my $receiver; my $checker; my $sock; my $skey; my $serv

Re: IO::Socket::UNIX questions

2004-12-31 Thread Jonathan Paton
On Thu, 30 Dec 2004 22:51:00 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... > > 3: Do UNIX sockets have less overhead than INET sockets? > > That all depends, it can go both way's. UNIX sockets, is > comunicatting through files. Faster way would be to > communicate through pipe's. I thi

Re: IO::Socket::UNIX questions

2004-12-30 Thread mgoland
- Original Message - From: Dave Kettmann <[EMAIL PROTECTED]> Date: Thursday, December 30, 2004 5:23 pm Subject: IO::Socket::UNIX questions > Hello list, Hi Dave, > > I am working with UNIX Sockets and have some questions that I cant > seem to find answers to on the w

Re: IO::Socket::UNIX questions

2004-12-30 Thread Jonathan Paton
> I am working with UNIX Sockets and have some questions > that I cant seem to find answers to on the web. Since the questions was interesting enough to me, I thought I would research the answer. "Perl Cookbook" contains an entire chapter on this. I am not a socket programmer! > 1: Are UNIX soc

IO::Socket::UNIX questions

2004-12-30 Thread Dave Kettmann
than INET sockets? Here is what I have for the OO connections: Server: my $server = IO::Socket::UNIX->new(Local => "/tmp/mysock", Type => SOCK_DGRAM, Listen=> 5 ) or die $@; Client: my

Re: IO::Socket - i can't get it to read the data

2004-10-17 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jeff 'japhy' Pinyan) writes: >The problem is that your data ends in \r\n, and the \r is a carriage >return. If you print "jeff\rABC", you'd *see* "ABCf", because the \r >causes the cursor to go to the beginning of the line, thus overwriting >prev

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Jeff 'japhy' Pinyan
On Oct 15, Etienne Ledoux said: >Would anybody have any idea why chomp is deleting the value ? > >No matter how I try and do it. I even tried s/\n//,$value . afterwards I have >a empty value. I don't understand what I'm doing wrong here and everywhere i >check this it seems to be the right way to

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
Would anybody have any idea why chomp is deleting the value ? No matter how I try and do it. I even tried s/\n//,$value . afterwards I have a empty value. I don't understand what I'm doing wrong here and everywhere i check this it seems to be the right way to do it. ?!?! e. On Friday 15 O

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
ok it seems like the chomp it stuffin it up ? if i removed it i get the correct data but with a \n On Friday 15 October 2004 11:56, Etienne Ledoux wrote: > greetings, > > This program listens on a port for an incoming connection. Once someone > connected it asks for a name and a password. but fo

IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
greetings, This program listens on a port for an incoming connection. Once someone connected it asks for a name and a password. but for some reason I can't get it to read the name/password entered. what am i missing please... while (($client,$client_address) = $server->accept()) {

Re: read multi-line banner w/ IO::Socket

2004-08-13 Thread Jeff 'japhy' Pinyan
On Aug 13, Jeff 'japhy' Pinyan said: > use IO::Select; > > my $s = IO::Select->new; > $s->add(\*SMTP_HANDLE); > > # 0 = timeout (return immediately if nothing waiting) > while (my ($pending) = $s->can_read(0)) { Ok, a timeout of 0 seconds is a WEE bit small. Make it .1 or something a little

Re: read multi-line banner w/ IO::Socket

2004-08-13 Thread Jeff 'japhy' Pinyan
On Aug 13, Jeremy Kister said: >I'm stumped on how to read from a filehandle, where I don't know how many >lines are waiting for me. You probably want to use IO::Select. >Is there a way to tell if i have data in <$sock> waiting for me, without >actually reading from the file handle (which could

read multi-line banner w/ IO::Socket

2004-08-13 Thread Jeremy Kister
and I cannot assume how many lines the banner will be. on the standard that the last line of the response from a SMTP server has a space after the code (instead of a dash), using IO::Socket, i've tried if($sock){ my $banner; while(<$sock>){ if(/^220\s/){ chomp;

Re: IO::Socket for http download

2004-07-02 Thread Ramprasad A Padmanabhan
On Thu, 2004-07-01 at 18:24, Ramprasad A Padmanabhan wrote: > I want to write a basic http download ( text/binary) script using > IO::Socket. Does anyone have any examples anywhere. Thanks all, I found a basic and excellent example. ( It pays to be patient when using google) http://perl.

Re: IO::Socket for http download

2004-07-02 Thread Randy W. Sims
Ramprasad A Padmanabhan wrote: I want to write a basic http download ( text/binary) script using IO::Socket. Does anyone have any examples anywhere. I know ,everyone must be wondering why I cant use ready modules like LWP. Well I want to auto transfer files to different remote machines. and these

Re: IO::Socket for http download

2004-07-02 Thread Ramprasad A Padmanabhan
> LWP requires none of those tools. It does exactly what you are > describing: it opens a socket and uses the HTTP protocol to talk to the > server. > > Randy. > Right. Do you have any sample http client script , using IO::Socket If I get some sample script , my work wil

IO::Socket for http download

2004-07-01 Thread Ramprasad A Padmanabhan
I want to write a basic http download ( text/binary) script using IO::Socket. Does anyone have any examples anywhere. I know ,everyone must be wondering why I cant use ready modules like LWP. Well I want to auto transfer files to different remote machines. and these machines ( in all flavors of

IO::Socket

2004-07-01 Thread Werner Otto
Hi All, I have the following problem. _Code:_ #!/usr/bin/perl use IO::Socket; my $host=shift @ARGV or die 'need hostname'; my $port=shift @ARGV or die 'need port number'; my $timeout=1; my $socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort => $port,

Re: Can't locate object method "new" via package "IO::socket::INET"

2004-04-15 Thread Paul Johnson
> #!C:/Programme/perl_5.8.2/Perl/bin/perl -w # > client.plx > > use strict; use IO::socket; use diagnostics; > > my $remote = IO::socket::INET->new( Proto => "tcp", > PeerAddr => > "XXX.XXX.XXX.XXX", PeerPort => "daytime(13)", )

Can't locate object method "new" via package "IO::socket::INET"

2004-04-15 Thread test testname
reasons)... #!C:/Programme/perl_5.8.2/Perl/bin/perl -w # client.plx use strict; use IO::socket; use diagnostics; my $remote = IO::socket::INET->new( Proto => "tcp", PeerAddr => "XXX.XXX.XXX.XXX", PeerPort => "daytime(13)", ) or die "Kann mich nicht mit

Can't locate object method "new" via package "IO::socket::INET"

2004-04-15 Thread test testname
: (XXX.XXX.XXX.XXX habe ich hier nur zur aus privat-Gründen eingefügt)... #!C:/Programme/perl_5.8.2/Perl/bin/perl -w # client.plx use strict; use IO::socket; use diagnostics; my $remote = IO::socket::INET->new( Proto => "tcp", PeerAddr => "XXX.XXX.XXX.XXX", PeerPort => &q

IO::Socket and Term::Readline

2004-03-10 Thread Ernest Beinrohr
f you have experience with this? I'm attaching the script, it's short and after running it you can telnet to localhost:8081 Code: use IO::Socket; use Term::ReadLine; # # Server Script: # Copyright 2003 (c) Philip Yuson # this program is distributed acco

Re: Help getting output from IO::Socket::INET

2003-06-26 Thread Tim Musson
Errr, sorry, I cut the "IO::Socket::INET" to put it in the subject, I should have done a copy... Here is what it should have been... use IO::Socket; my $socket = IO::Socket::INET->new("localhost:80") or die "cannot connect to localhost:80 : [EMAIL PRO

Help getting output from IO::Socket::INET

2003-06-25 Thread Tim Musson
I think this bit of code used to work, but I can't figure how to make the last line dump anything out... ,- [ ] | use strict; | use warnings; | use IO::Socket; | | my $socket =->new("localhost:80") | or die "cannot connect to localhost:80 : [EMAIL PROTECTED]

Re: How to use IO::Socket

2003-03-19 Thread Robert Rendler
On Wed, 19 Mar 2003 09:01:28 -0500 Bob Showalter <[EMAIL PROTECTED]> wrote: > > That can't work. You need a port at least. Where are you checking for failed > connection? Do you have "use strict" and -w in your program. > That was just a VERY basic example of creating $client and yes I do use s

RE: How to use IO::Socket

2003-03-19 Thread Bob Showalter
Robert Rendler wrote: > Over the long haul I've made a couple of programs that use sockets > but still I don't understand to very basics of it yet. That is how to > properly send and receive the data. So far what I have been doing is > thus: > > $client = IO::Socket

How to use IO::Socket

2003-03-19 Thread Robert Rendler
Over the long haul I've made a couple of programs that use sockets but still I don't understand to very basics of it yet. That is how to properly send and receive the data. So far what I have been doing is thus: $client = IO::Socket::INET->new('server'); while (<$clie

Re: IO::Socket problem how to receive data?

2002-09-02 Thread anthony
Hi, I've read the perl doc but it was not usefull any how i fixed it, what i was trying to do is to send data from a Visual basic program to a perl program, then from perl to a visual basic program thanx anyways guys, Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: IO::Socket problem how to receive data?

2002-09-02 Thread James Edward Gray II
I'm not sure I totally understand all of your question, but talking over an IO::Socket is pretty darn simple, if we're talking about a line oriented protocol. You can use what you have always used for Perl input and output: use IO::Socket::INET; my $socket = IO::Socket::INET->

Re: IO::Socket problem how to receive data?

2002-09-02 Thread Felix Geerinckx
on Sun, 01 Sep 2002 15:15:27 GMT, [EMAIL PROTECTED] (Anthony) wrote: > I'm trying to learn IO::Socket and i have a little problem is that > i DO NOT know how to receive data i use the recv function but > doesn't work at all. [...] > But I can send data to a perl progra

IO::Socket problem how to receive data?

2002-08-31 Thread anthony
Hi, I'm trying to learn IO::Socket and i have a little problem is that i DO NOT know how to receive data i use the recv function but doesn't work at all. I know how to send data- I know it works because it is a visual basic program that receives the data and it displays the correct da

Re: Help with IO::Socket::INET

2002-08-14 Thread Tim Musson
Hey zentara, My MUA believes you used to write the following on Wednesday, August 14, 2002 at 8:20:39 AM. z> It works for me if I comment out the "print $remote" and z> uncomment the while ( <$remote> ) { print; } Grrr, I just tried a different http server, and it works just fine...

Re: Help with IO::Socket::INET

2002-08-14 Thread zentara
On Tue, 13 Aug 2002 22:08:47 -0400, [EMAIL PROTECTED] (Tim Musson) wrote: >### The next line is where I think I am having problems... >### If I uncomment, I seem to recall it displaying the html code from >### above (HTTP/1.0 200 OK, etc...). But what happens is it just hangs. > ># while ( <$rem

Re: Help with IO::Socket::INET

2002-08-13 Thread Felix Geerinckx
on Wed, 14 Aug 2002 02:32:30 GMT, [EMAIL PROTECTED] (Tim Musson) wrote: > Ok, can you point me to an example? I have never used that module > before, and it has been probably 4 years since I have done something > like this. From a browser what would happen is > 1. hit the router/switch > 2. res

Re: Help with IO::Socket::INET

2002-08-13 Thread Tim Musson
Hey George, Ok, can you point me to an example? I have never used that module before, and it has been probably 4 years since I have done something like this. From a browser what would happen is 1. hit the router/switch 2. respond to the userid/pw challenge 3. go to a new page I would

Re: Help with IO::Socket::INET

2002-08-13 Thread George Schlossnagle
n > > This is what I get: > HTTP/1.0 200 OK > Server: TinyWeb/1.9 > Content-Length: 382 > Content-Type: text/html > > Tim's ThinkPad > 8< sniped for brevity > > Here is my perl code in it's entirity... > > > #!p

Help with IO::Socket::INET

2002-08-13 Thread Tim Musson
- sniped for brevity Here is my perl code in it's entirity... #!perl -w use strict; use IO::Socket; my (%FORM, $HeaderLine, $remote, $debug); $FORM{Method} = "GET"; $FORM{Page} = ""; $FORM{HTTPv} = "1.0"; print "$FORM{Method} /$FORM{Page} HTTP/

Re: get page with IO::Socket , but having trouble saving to file

2002-07-13 Thread drieux
On Saturday, July 13, 2002, at 08:06 , FLAHERTY, JIM-CONT wrote: [..] > unless ($remote) { die "cannot connect to http daemon on $host" } > > $remote->autoflush(1); [..] >print LOG9 " $remote \"GET $document HTTP/1.0\" . $BLANK"; > > while ( <$remote> ) { print LOG9 }

Re: get page with IO::Socket , but having trouble saving to file

2002-07-13 Thread Felix Geerinckx
on Sat, 13 Jul 2002 15:06:38 GMT, Jim-Cont Flaherty wrote: > Hello, get page with IO::Socket , but having trouble saving to file > > This is what I got: > [code snipped] > Help , what am I doing Wrong ?? You are trying to reinvent the wheel instead of using LWP::Simple.

get page with IO::Socket , but having trouble saving to file

2002-07-13 Thread FLAHERTY, JIM-CONT
Hello, get page with IO::Socket , but having trouble saving to file This is what I got: use IO::Socket; $host = "www.cnn.com"; $document = "/newhomepage1.htm"; foreach $doc ($document) { $remote = IO::Socket::INET->

Re: last and labels was Re: IO::socket close() and"bad file descriptor"

2002-05-04 Thread Peter Scott
At 09:04 AM 5/4/02 -0700, drieux wrote: my question is why the use of the while() construct in > http://www.perldebugged.com/downloads/proxylog.txt > >hence the need to have the last LABEL construction??? > >especially as this appears to avoid the call to your >shutdown function - which s

last and labels was Re: IO::socket close() and "bad file descriptor"

2002-05-04 Thread drieux
On Saturday, May 4, 2002, at 08:19 , Peter Scott wrote: [..] > You got a true result. The connection closed properly. The value of $! > is irrelevant. my complements. my question is why the use of the while() construct in http://www.perldebugged.com/downloads/proxylog.txt hence the

Re: IO::socket close() and "bad file descriptor"

2002-05-04 Thread drieux
On Friday, May 3, 2002, at 11:05 , Keddie, Diane wrote: [..] > > my $close=close($sock); > > The socket connection works, and we get the appropriate information back > from our mainframe scripts. However, the return value from close($sock) > is > 1 with "Bad file number" in $!. Should we be co

Re: IO::socket close() and "bad file descriptor"

2002-05-04 Thread Peter Scott
At 02:05 PM 5/3/02 -0400, Keddie, Diane wrote: >We are working on an application that makes a socket connection to our >mainframe to get information. The code we use for the socket connection is >as follows: >[snip] >my $close=close($sock); > >The socket connection works, and we get the appropria

  1   2   >