Re: Sockets getting stuck

2015-10-13 Thread David Emanuel da Costa Santiago
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Brandom. On Tue, 13 Oct 2015 10:08:27 -0400 Brandon McCaig wrote: > On Tue, Oct 13, 2015 at 6:34 AM, David Emanuel da Costa Santiago > wrote: > > Hi! > > Hello, > > > THanks for your suggestion. > > I assume this was off-list because

Re: Sockets getting stuck

2015-10-13 Thread Brandon McCaig
On Tue, Oct 13, 2015 at 6:34 AM, David Emanuel da Costa Santiago wrote: > Hi! Hello, > THanks for your suggestion. I assume this was off-list because I didn't get it. Also consider bottom-posting or interleaved posting for easier reading. > I changed my code to: > > sub _read_from_socket{ >

Re: Sockets getting stuck

2015-10-13 Thread David Emanuel da Costa Santiago
Hi! THanks for your suggestion. I changed my code to: sub _read_from_socket{ my ($select) = @_; my ($output, $buffer) = ('', ''); my $socket = undef; do { $socket = ($select->can_read(0.1))[0]; } while (!defined $socket); while(1){ my $status = $socket->read($buffer

Re: Sockets getting stuck

2015-10-12 Thread David Emanuel da Costa Santiago
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello all, So... i fired up wireshark and i can see that the socket get in hanged state when i get a first "TCP spurious retransmission". This is how it goes: Local [Syn] -> Remote Local [Syn] -> Remote Remote [SYN ACK] -> Local Local [ACK] ->

Re: Sockets

2010-10-08 Thread Uri Guttman
> "JB" == Jonas Bull writes: JB> use POSIX qw|setsid|; JB> use Getopt::Long; JB> use Socket; that module is not needed. JB> use IO::Socket; JB> use threads; JB> use threads::shared; JB> use IO::Select; JB> ## options from cli #

Re: Sockets

2006-09-09 Thread Jack Faley ( The Tao of Jack )
On 9/9/06, elite elite <[EMAIL PROTECTED]> wrote: Does anyone know any good links on networking with perl or on sockets? check out docs for IO::Socket How about books? Both at Amazon at the very least: Network Programming with Perl by Lincoln D. Stein, Addison-Wesley Professional Progr

Re: Sockets

2006-09-09 Thread Randal L. Schwartz
> "elite" == elite elite <[EMAIL PROTECTED]> writes: elite> Does anyone know any good links on networking with elite> perl or on sockets? Are you just curious, or are you inventing a new protocol? Because if you're not either of those, there are modules that handle almost every major protoco

Re: Sockets

2006-09-09 Thread jeffhua
Lincoln Stein's great book of 'Network Programming with Perl' is very good for your purpose. -Original Message- From: [EMAIL PROTECTED] To: beginners@perl.org Sent: Sat, 9 Sep 2006 7:56 PM Subject: Sockets Does anyone know any good links on networking with perl or on sockets?

Re: Sockets questions

2005-12-03 Thread Octavian Rasnita
From: "Scott" <[EMAIL PROTECTED]> > I recently started messing with perl sockets and I was wondering if it is > possible to do any of the following: > > - Pre-shared key, to act as some sort of authentication. Currently I have > it checking the peer address, but I figure that could be spoofed. >

RE: Sockets, Why can't I do this?

2004-03-10 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : : I get an unknown error from the command prompt. Care to share the error with us? HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: sockets on an HPUX

2004-01-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > People of the Perl, Hello, > does anyone have a perl program that will create a socket ( srwxr-xr-x ) > for a HPUX 11.0 system? I am in need of this! I have looked into system > calls such as mknod and mkfifo and these are not capable of creating these > special fi

Re: sockets on an HPUX (thanks for the port scanner!)

2004-01-09 Thread Goffredo Saffioti
McMahon, Chris ha scritto: Thank you Mr. Saffioti for the port-scanning code. I have been playing with some simple network programming scripts recently and your code below is much more elegant than mine. I'll be stealing parts of it very soon! =) -Chris maybe u can better apprecia

RE: sockets on an HPUX (thanks for the port scanner!)

2004-01-09 Thread McMahon, Chris
fredo Saffioti [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 10:52 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: sockets on an HPUX [EMAIL PROTECTED] ha scritto: >People of the Perl, > >does anyone have a perl program that will create a socket ( srwxr-xr-x ) >for a

Re: sockets on an HPUX

2004-01-09 Thread Goffredo Saffioti
[EMAIL PROTECTED] ha scritto: People of the Perl, does anyone have a perl program that will create a socket ( srwxr-xr-x ) for a HPUX 11.0 system? I am in need of this! I have looked into system calls such as mknod and mkfifo and these are not capable of creating these special files. Thank

Re: Sockets and Daemonizing - was Re: Count the no of times a script is called

2003-11-27 Thread drieux
On Thursday, Nov 27, 2003, at 01:26 US/Pacific, Tom Kinzer wrote: Not sure, I'm not an admin by trade, but I was actually referring to the fact that some admins assume that user Perl processes that don't die, are doing so unintentionally. Ah! an interesting take. Having been one of those folks who

RE: Sockets and Daemonizing - was Re: Count the no of times a script is called

2003-11-27 Thread Tom Kinzer
Not sure, I'm not an admin by trade, but I was actually referring to the fact that some admins assume that user Perl processes that don't die, are doing so unintentionally. I'm sure there may also be security issues with the user/socket coding as well. - -Tom Kinzer Long Beac

RE: Sockets

2003-07-17 Thread Kipp, James
> > In the documentation of socket appears the fllowing: > $sockaddr = 'S n a4 x8' > > What means this??? it is a template for packing the generic C socket adr structure. readup on sockets for deeper explanation. the adt string is packed into structure of: a signed short, followed by an intege

Re: Sockets

2003-07-16 Thread John W. Krahn
"Jose M.Herrera" wrote: > > In the documentation of socket appears the fllowing: > $sockaddr = 'S n a4 x8' > > What means this??? That is a format string to be used with pack() and/or unpack() perldoc -f pack John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: SOCKETS??

2003-07-08 Thread david
"Andre Chaves Mascarenhas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi How do i read a web page with socks? do i send? if SK is a open socjet at port 80 at lets say www.yahoo.com if i send print SK "GET /index.htm HTTP/1.1\n" will i get the www.yahoo.com/index.htm page ? Thanks

RE: sockets: packing an inet sructure

2003-07-02 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (James Kipp) writes: >$template = 'S n C4 x8'; >$| = 1; >socket(MY_SOCKET, AF_INET, SOCK_STREAM, 0) || die "Socket: $!\n"; > >$addr = (gethostbyname("10.1.101.12"))[4]; >$paddr = pack($template,AF_INET,$port,$addr); >bind(MY_SOCKET, $paddr) || die

RE: sockets: packing an inet sructure

2003-07-01 Thread Kipp, James
> > $addr = (gethostbyname("10.1.101.12"))[4]; > > $paddr = pack($template,AF_INET,$port,$addr); > > If you dump out $paddr right here, you'll see that the > address portion is > all zeros, so you're really binding to INADDR_ANY and not to > the specific > address. However, the AF_INET is still

RE: sockets: packing an inet sructure

2003-07-01 Thread Bob Showalter
Kipp, James wrote: > the server is a Intel P3, same as the client. Little endian. I agree, > it shouldn't work, but it does. here is the code: > -- > $port = 6668; > $template = 'S n C4 x8'; > $| = 1; > socket(MY_SOCKET, AF_INET, SOCK_STREAM, 0) || die "Socket: $!\n"; > > $addr = (gethostbyname("1

RE: sockets: packing an inet sructure

2003-07-01 Thread Kipp, James
> > > Your template is wrong. You need 'x C n a4 x8' (or 'n n a4 x8'). > > Thanks, I will give that a shot. Altough, all of the docs > that i read > > pack the structure with the 'S n C4 x8' template > > Is that in the Perl docs somewhere? no, they say to use sockaddr_in() of course. docs I foun

RE: sockets: packing an inet sructure

2003-07-01 Thread Bob Showalter
Kipp, James wrote: > > > $template = 'S n C4 x8'; > > > > Your template is wrong. You need 'x C n a4 x8' (or 'n n a4 x8'). > Thanks, I will give that a shot. Altough, all of the docs that i read > pack the structure with the 'S n C4 x8' template Is that in the Perl docs somewhere? The first S wi

RE: sockets: packing an inet sructure

2003-07-01 Thread Kipp, James
> > $template = 'S n C4 x8'; > > Your template is wrong. You need 'x C n a4 x8' (or 'n n a4 x8'). Thanks, I will give that a shot. Altough, all of the docs that i read pack the structure with the 'S n C4 x8' template and it does work on the Server end. > The returned value from gethostbyname is

RE: sockets: packing an inet sructure

2003-07-01 Thread Bob Showalter
Kipp, James wrote: > I am trying to hand pack an net addr. On the server end (linux - > i386) it works fine.: > $addr = pack($template,AF_INET,$port,$iaddr); > bind(MY_SOCKET, $addr) || die "$0: Cannot bind .. $!\n"; -- > on the client end (win2k - i386) it fails. > -- > $template = 'S n C4 x8'; Y

RE: sockets: packing an inet sructure

2003-07-01 Thread Kipp, James
> > maybe because of big Indian small Indian problem ?? just a > though I never pack'd it my self. good thinking, but the CPU is the same on both machines. It is Endian btw.. :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sockets: packing an inet sructure

2003-07-01 Thread mgoland
maybe because of big Indian small Indian problem ?? just a though I never pack'd it my self. Mark G - Original Message - From: "Kipp, James" <[EMAIL PROTECTED]> Date: Tuesday, July 1, 2003 9:24 am Subject: sockets: packing an inet sructure > I am trying to hand pack an net addr. On the

RE: Sockets....

2002-11-14 Thread Sorrells, Dave
Bingo! Thanks Paul, you are correct. $_ is not getting loaded in the while statement. >someone please poke me if I'm dreaming, but if you say > > while(<$new_sock>) { print $_; } > >the while(<>){} structure automatically loads $_ with whatever came out >of the <> ... IF and ONLY IF the diamond op

RE: Sockets....

2002-11-14 Thread Kipp, James
> Server: > #!/usr/bin/perl > use IO::Socket; > my $sock = new IO::Socket::INET ( > LocalHost => 'IP_GOES_HERE', > (<-- yes this > is set properly) > LocalPort => '6', > Proto => 'tcp', >

Re: Sockets....

2002-11-14 Thread Paul
> no idea if that is correct. Is there something missing, how does $_ > get assigned the input from $new_sock? Thanks. > > while(defined(<$new_sock>)) { >print "Socket defined\n"; >print $_; > } someone please poke me if I'm dreaming, but if you say while(<$new_sock>) { print $_; } t

RE: Sockets....

2002-11-14 Thread Sorrells, Dave
A little clarification of the problem. The line "test" does not get printed at the server. Dave Sorrells ciber Office: (585) 231-2071 Cell: (585) 755-9015 Email: [EMAIL PROTECTED] Text Messaging: [EMAIL PROTECTED] AIM: Dave Ciber -Original Message- From: Sorrells, Dave [mailto:Dave.Sorr

Re: Sockets and Sleep Question

2002-10-04 Thread Michael Fowler
On Thu, Oct 03, 2002 at 05:12:38PM -0700, Jessee Parker wrote: > I will definitely take a look at this. How do you determine what your > current "nice" status is? nice, with no arguments, will give you your current nice level. ps and top will diplay the nice level (or sometimes priority) of proc

Re: Sockets and Sleep Question

2002-10-03 Thread Jessee Parker
> On Thu, Oct 03, 2002 at 10:10:34AM -0700, Jessee Parker wrote: > > At the top of the loop, I check the system uptime to get the load average > > so I can have the program sleep for 5 seconds to let things stabilize a > > bit. > > I suspect an easier way of doing this would be to nice yourself do

Re: Sockets and Sleep Question

2002-10-03 Thread Michael Fowler
On Thu, Oct 03, 2002 at 10:10:34AM -0700, Jessee Parker wrote: > At the top of the loop, I check the system uptime to get the load average > so I can have the program sleep for 5 seconds to let things stabilize a > bit. I suspect an easier way of doing this would be to nice yourself down really l

Re: Sockets

2002-06-25 Thread Felix Geerinckx
> Basically, I need to know what I should specifically be > looking > at...Thoughts? Look at Lincoln Stein's excellent "Network Programming with Perl" -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Sockets and NNTP

2002-03-03 Thread Hernan Freschi
I already did, but I dont understand it,... it uses objects and I don't know them. "Daniel Gardner" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED].; > > Sunday, March 03, 2002, 1:11:39 AM, Hernan Freschi wrote: > > I wrote a little script to get the newsgroup list from a newss

Re: Sockets and NNTP

2002-03-03 Thread Daniel Gardner
Sunday, March 03, 2002, 1:11:39 AM, Hernan Freschi wrote: > I wrote a little script to get the newsgroup list from a newsserver. It > opens a socket, connects to it, writes "LIST\n" and does while () > 'till /^\./. > The problem is that, it works only with some servers. On others, it just > keeps

Re: Sockets

2002-02-27 Thread walter valenti
There two via: 1) C language style, 2)using a module. 1) ##example client use Socket; ##export costants socket(SK,PF_INET,SOCK_STREAM,getprotobyname('tcp')) || die"$!\n"; ###declaration: SK is a name gived at the socket; PF_INET is a costant: socket internet; SOCK_STREAM is a costant: ## type o

Re: Sockets

2002-02-25 Thread Paul Johnson
On Mon, Feb 25, 2002 at 02:52:05PM -0800, Peter Scott wrote: > Which doesn't have anything to do with using a higher-level module. Correct. > Do you do your CGI programming by hand as well, or use CGI.pm? What makes you think I do any CGI programming? Oh, okay then. Since there's something o

Re: Sockets

2002-02-25 Thread Peter Scott
At 12:23 AM 2/26/02 +0100, Paul Johnson wrote: >On Mon, Feb 25, 2002 at 01:41:34PM -0800, Peter Scott wrote: > > At 11:15 PM 2/25/02 +0100, Paul Johnson wrote: > > >On Mon, Feb 25, 2002 at 10:01:25PM +0200, Mohammed A. Hassan wrote: > > > > > > > How can I use sockets in Perl? > > > > > >I would s

Re: Sockets

2002-02-25 Thread Paul Johnson
On Mon, Feb 25, 2002 at 01:41:34PM -0800, Peter Scott wrote: > At 11:15 PM 2/25/02 +0100, Paul Johnson wrote: > >On Mon, Feb 25, 2002 at 10:01:25PM +0200, Mohammed A. Hassan wrote: > > > > > How can I use sockets in Perl? > > > >I would suggest starting off with > > > > perldoc -f socket > > p

Re: Sockets

2002-02-25 Thread Peter Scott
At 11:15 PM 2/25/02 +0100, Paul Johnson wrote: >On Mon, Feb 25, 2002 at 10:01:25PM +0200, Mohammed A. Hassan wrote: > > > How can I use sockets in Perl? > >I would suggest starting off with > > perldoc -f socket > perldoc Socket Ooh, how low-level. I'd suggest rather IO::Socket. And if the

Re: Sockets

2002-02-25 Thread Paul Johnson
On Mon, Feb 25, 2002 at 10:01:25PM +0200, Mohammed A. Hassan wrote: > How can I use sockets in Perl? I would suggest starting off with perldoc -f socket perldoc Socket and following the pointers from there, then coming back if you have more specific questions. -- Paul Johnson - [EMAIL PR

RE: Sockets in an array

2002-02-25 Thread Jenda Krynicky
From: Richard Smith <[EMAIL PROTECTED]> > I have had problems using "my" when refering to File Handles, > especially when I wish to pass them to subroutines. I have also had > problems declaring them with $ or @, and have been forced to use: > local *logHandle; Is this because

RE: Sockets in an array

2002-02-25 Thread Richard Smith
Hi Jenda, I have had problems using "my" when refering to File Handles, especially when I wish to pass them to subroutines. I have also had problems declaring them with $ or @, and have been forced to use: local *logHandle; Is this because I am declaring the actual filehandle, and not a refer

RE: Sockets in an array

2002-02-25 Thread Jenda Krynicky
From: Richard Smith <[EMAIL PROTECTED]> > > $newsocket[$i] = IO::Socket::INET->new("$address") or die $@; > > How are you declaring "newsocket"? I would probably decare it as > "local" rather than as "my". Worth a try anyway. Unfortunately I > can't try it here. Thanks, Smiddy Please don't.

RE: Sockets in an array

2002-02-25 Thread Richard Smith
> $newsocket[$i] = IO::Socket::INET->new("$address") or die $@; How are you declaring "newsocket"? I would probably decare it as "local" rather than as "my". Worth a try anyway. Unfortunately I can't try it here. Thanks, Smiddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Sockets in an array

2002-02-22 Thread John W. Krahn
Girish Chandran wrote: > > Hi, > > I have the following problem. > > Context: > I am trying to open multiple sockets to multiple IP address. > I want to use the same piece of code to do that. > The IP addresses and port numbers are stored in a file. > > The program: > I read the file, open the

RE: Sockets in an array

2002-02-22 Thread Nikola Janceski
I have run into this situation before, but never found a solution.. But now that I see the problem try the following prints: print ${$newsocket[$i]} $command; print *{$newsocket[$i]} $command; print *newsocket[$i] $command; I think the second one might work... let us know how it goes. -Orig

Re: sockets help??

2002-02-06 Thread walter valenti
> > >I am trying to write winsock software to have one client connect to three different >server computers (not simultaneously) by simple sock stream. I tried to create one >socket and connect to each computer. Once the previous connection is completed with >one of the computers, I would chan

Re: sockets

2002-02-05 Thread walter valenti
What's the scottscript script??? It is called by a system, function and executing in a self space. If this script print on STDOUT, for this script scottscript,STDOUT is the screen, don't the file (is the file for the script viewed in this mail). P.S. Sorry for my bad english . Walter >C

Re: Sockets help

2001-05-30 Thread Randal L. Schwartz
> "Jason" == Jason <[EMAIL PROTECTED]> writes: Jason> I need to write a program that will take a list of url's for pictures Jason> and download them. I was reading up on sockets but i found them a bit Jason> confusing. Some assistance with sockets would be very helpfull. CPAN has Image::G

Re: Sockets help

2001-05-30 Thread Walt Mankowski
On Wed, May 30, 2001 at 09:47:51AM -0400, Jason wrote: > I need to write a program that will take a list of url's for pictures > and download them. I was reading up on sockets but i found them a bit > confusing. Some assistance with sockets would be very helpfull. Use LWP::Simple. It can alrea

Re: Sockets help

2001-05-30 Thread Ondrej Par
Hi, better than playing with sockets and doing all that low-level HTTP stuff, take a look at LWP module(s). That's exactly what you need. On Wednesday 30 May 2001 15:47, Jason wrote: > I need to write a program that will take a list of url's for pictures > and download them. I was reading up o