t: Tuesday, January 16, 2024 6:26 AM
To: beginners@perl.org
Subject: Using UNIX domain sockets
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you recognize the sender and know the content
is safe.
Hi,
I am trying to control mpv player
Hi,
I am trying to control mpv player using unix sockets but it looks like
that perl is unable to send the string correctly.
I run the following command:
mpv --input-ipc-server=~/mpv.sock --idle=yes -v -v
If I sent the string using system commands:
$ echo '{"command":[&q
Sockets cannot tell you how much data will come in any language. You HAVE
to rely on Content-Length, that is what it is for. Why do you think "It
doesn´t
seem wise to rely [it]"?
It is not possible for a loop to both be blocking (which means it is using
no CPU until signaled there is
I couldn´t find a documentation
about using sockets which isn´t anything but confusing and leaves lots
of questions. I also guess I need something event-driven, i. e. send a
request, and in the event that the server sends data, somehow receive it
in the background.
The application would need to do
-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
of time, or exit 1.
Perhaps your troubles aren't code and are instead network stability.
If your network isn't stable enough to receive the packets then there
isn't much you can do within software to fix it.
Unless you need socket-level access consider using a higher-level
network pro
2015 20:50:46 -0700
$Bill wrote:
> This failed twice to post - emailing it.
>
> On 10/12/2015 09:58, David Emanuel da Costa Santiago wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> >
> > Hello all!
> >
> > I'm creating s
ocket simply gets in zombie state. Not dead, but not
alive.
The connection timeout doesn't work, the receive timeout (SO_RCVTIMEO)
and send timeout (SO_SNDTIMEO) does work.
Is there any way to recover from this?
On Mon, 12 Oct 2015 18:58:42 +0200
David Emanuel da Costa Santiago wrote:
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Hello all!
I'm creating some sockets to a remote server and from time to time, the
sockets get "frozen".
I'm creating the socket as:
$socket = IO::Socket::INET->new (
from the remote client,.
How can I accomplish that the server still
responds to incoming requests on port 1234 but
also sends its commands over the other socket to
port 4321?
You have basically three options for reading and
writing from/to multiple sockets simultaneously:
1. Non-blocking
nt something
> above... All I want to accomplish is talking over 2 (or more)
> sockets without the server hanging itself on one of the
> sockets.
>
> Any help with examples or pointers in the right direction is
> appreciated!
I used IO::Select for bambot[1]. I use it to detect whet
I've found some people talking about IO::Socket:Select but I'm unable to find a
simple example of how to implement something above...
All I want to accomplish is talking over 2 (or more) sockets without the server
hanging itself on one of the sockets.
Any help with examples or pointers
> "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 #
Programming sockets for a persistent service is something relatively
new to me.
Here is the main part of the program as it stands:
use POSIX qw|setsid|;
use Getopt::Long;
use Socket;
use IO::Socket;
use threads;
use threads::shared;
use IO::Select;
## options from
lmeyer.blt...@gmail.com]
Sent: Wednesday, April 28, 2010 3:29 PM
To: beginners@perl.org
Subject: Perl not closing TCP sockets if clients are no longer
connected?
The purpose of the application is to listen for a specific UDP multicast
and
then to forward the data to any TCP clients connected to the server
The purpose of the application is to listen for a specific UDP multicast and
then to forward the data to any TCP clients connected to the server. The
code works fine, but I have a problem with the sockets not closing after the
TCP clients disconnects. A socketsniffer utility shows the the sockets
Hi,
I am having problems creating a multithread queued Server because i can
not enqueue sockets..
For example is not possible to make something like this..
my $Qwork = new Thread::Queue;
our $server = new Net::SMTP::Server($host) ||
while(my $conn = $server->accept()) {
$Qw
-Original Message-
From: kenTk [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 01, 2008 10:41 PM
To: beginners@perl.org
Subject: Re: Reading from multiple sockets.
On Oct 30, 8:33 am, [EMAIL PROTECTED] (Kammen van) wrote:
> >>> From: Peter Scott [mailto:[EMA
On Oct 30, 8:33 am, [EMAIL PROTECTED] (Kammen van) wrote:
> >>> From: Peter Scott [mailto:[EMAIL PROTECTED]
> >>> Subject: Re: Reading from multiple sockets.
>
> >> On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM
> NL
> >> wrote
>>> From: Peter Scott [mailto:[EMAIL PROTECTED]
>>> Subject: Re: Reading from multiple sockets.
>
>> On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM
NL
>> wrote:
>> I'm pretty new to working with sockets in perl, looked around for
Kammen van, Marco, Springer SBM NL wrote:
>
>>> From: Peter Scott [mailto:[EMAIL PROTECTED]
>>> Subject: Re: Reading from multiple sockets.
>
>> On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM
NL
>> wrote:
>> I'm pretty new
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2008 2:51 PM
To: Perl Beginners
Subject: Re: Reading from multiple sockets.
Kammen van, Marco, Springer SBM NL wrote:
>
>>> From: Peter Scott [mailto:[EMAIL PROTECTED]
>
Kammen van, Marco, Springer SBM NL wrote:
From: Peter Scott [mailto:[EMAIL PROTECTED]
Subject: Re: Reading from multiple sockets.
On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM NL
wrote:
I'm pretty new to working with sockets in perl, looked around for days
for a p
>>From: Peter Scott [mailto:[EMAIL PROTECTED]
>>Subject: Re: Reading from multiple sockets.
>On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM NL
>wrote:
> I'm pretty new to working with sockets in perl, looked around for days
> for a proper so
On Tue, 21 Oct 2008 12:53:53 +0200, Kammen van, Marco, Springer SBM NL
wrote:
> I'm pretty new to working with sockets in perl, looked around for days
> for a proper solution for my IRC/DCC problem but couldn't find one.
If you'd like to do this without grubbing around at th
-Original Message-
From: Bob McConnell [mailto:[EMAIL PROTECTED]
> Which I forgot to mention is that both my sockets are connected to
> different ports... (54321 & 1024)
> And also, one socket is connected to a server, and the other socket is
> accepting from a client.
From: Kammen van, Marco, Springer SBM NL
>>Hi All!
>>
>>I'm pretty new to working with sockets in perl, looked around for days
>>for a proper solution for my IRC/DCC problem but couldn't find one.
>>
>>The connection to the server uses a socket with a
>Hi All!
>
>I'm pretty new to working with sockets in perl, looked around for days
>for a proper solution for my IRC/DCC problem but couldn't find one.
>
>The connection to the server uses a socket with a neverending while
>loop:
>All works fine untill i w
Hi All!
I'm pretty new to working with sockets in perl, looked around for days
for a proper solution for my IRC/DCC problem but couldn't find one.
The connection to the server uses a socket with a neverending while
loop:
sub connection {
# Make The Initial Server Connection! #
On 24 Sep 2008, at 15:44, Rob Dixon wrote:
Andy Dixon wrote:
I may be being a bit dim, but I wrote this:
#!/usr/bin/perl -w
use IO::Socket::INET;
print "ISONAS Logger (perl) v1\n";
my $socket = IO::Socket::INET->new(
PeerAddr => "10.9.1.100",
Pe
meh
Deviloper wrote:
>
> If I were in your place, I would use Data::Dumper or a IDE with a grafical
> debugger and take a look what happens. try the 30 Days Trail of Komodo Pro
> Studio
> IDE or OptiPerl is you don´t like data::dumper.
>
> Try in your while loop
>
> m
; > > > }
> >
> > do
> >
> > > > while ($socket->recv($text,128)) {
> > > > print $text;
> > > > }
> >
> > Byebye,
> > Bo
> >
> > Stewart Anderson <[EMAIL PROTECTED]> hat am 24.
Andy Dixon wrote:
>
> I may be being a bit dim, but I wrote this:
>
> #!/usr/bin/perl -w
> use IO::Socket::INET;
> print "ISONAS Logger (perl) v1\n";
> my $socket = IO::Socket::INET->new(
> PeerAddr => "10.9.1.100",
> PeerPort => "5321"
>
tewart Anderson <[EMAIL PROTECTED]> hat am 24.
September 2008 um 13:35 geschrieben:
> > -Original Message-
> > From: Andy Dixon [mailto:[EMAIL PROTECTED]
> > Sent: 24 September 2008 12:26
> > To: beginners@perl.org
> > Subject: Perl Sockets oddity..
&
Bo
Stewart Anderson <[EMAIL PROTECTED]> hat am 24. September 2008 um 13:35
geschrieben:
> > -Original Message-
> > From: Andy Dixon [mailto:[EMAIL PROTECTED]
> > Sent: 24 September 2008 12:26
> > To: beginners@perl.org
> > Subject: Perl
> -Original Message-
> From: Andy Dixon [mailto:[EMAIL PROTECTED]
> Sent: 24 September 2008 12:26
> To: beginners@perl.org
> Subject: Perl Sockets oddity..
>
> Hello,
>
> I may be being a bit dim, but I wrote this:
>
> #!/usr/bin/perl -w
> use IO::
Hello,
I may be being a bit dim, but I wrote this:
#!/usr/bin/perl -w
use IO::Socket::INET;
print "ISONAS Logger (perl) v1\n";
my $socket = IO::Socket::INET->new(
PeerAddr => "10.9.1.100",
PeerPort => "5321"
) or die $!;
prin
Richard Luckhurst wrote:
Hi List
Hello,
I have just been given the task of finding out why a perl sockets listener
application we have is no longer working correctly. The application was written
back in 2002 and I am told worked fine until we were forced to install a new
server early this
Hi List
I have just been given the task of finding out why a perl sockets listener
application we have is no longer working correctly. The application was written
back in 2002 and I am told worked fine until we were forced to install a new
server early this year. I have no idea what version of
tinitialize sub.
> Besides, if it wasn't global, wouldn't I be unable to read from it at
> all in the checkconnections sub? I can read the list of sockets out of
> select. Otherwise, perl would never get down to line 1256 and I would
> never get my error, no?
>
> If you
ouldn't I be unable to read from it at
> all in the checkconnections sub? I can read the list of sockets out of
> select. Otherwise, perl would never get down to line 1256 and I would
> never get my error, no?
>
> If you want to view the entire script, you can at
> http://s
;use strict'. I'm
$Select is global and I am using strict and warnings. It is declared
at the top of the program and defined in the socketinitialize sub.
Besides, if it wasn't global, wouldn't I be unable to read from it at
all in the checkconnections sub? I can read the li
>
>Is $Select a global variable? Is that why it's got a capital letter? I
>suspect that you're not coding under the rules of 'use strict'. I'm
>not sure whether that indicates a problem with your program, but it
>bears further investigation.
>
>Cheers!
>
>--Tom Phoenix
>Stonehenge Perl Training
>
On 3/22/07, Andy Greenwood <[EMAIL PROTECTED]> wrote:
$Select = new IO::Select();
Is $Select a global variable? Is that why it's got a capital letter? I
suspect that you're not coding under the rules of 'use strict'. I'm
not sure whether that indicates a problem with your program, but
}
// close socket
@socket_close($socket);
// return
return $return;
} else { // fluxd not running
return null;
}
}
end php
here's the perl code which creates and reads the sockets
-
On 3/22/07, Andy Greenwood <[EMAIL PROTECTED]> wrote:
I am getting the following error whenever I try to send data to a unix
domain socket. PHP sends the command just fine, but perl dies as soon
as it reads from the socket.
Are you using PHP, or Perl? Both?
send: Cannot determine peer addres
I am getting the following error whenever I try to send data to a unix
domain socket. PHP sends the command just fine, but perl dies as soon
as it reads from the socket.
send: Cannot determine peer address at myscript.pl line 1256
I found the following page which discusses a fix for this on Open
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 Profes
>>>>> "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
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
per
Does anyone know any good links on networking with
perl or on sockets?
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
I am working on a sockets based script. My question is what if the length
of the recv is likely to change, but you need the following recv lines not
to get corrupted?
Example
$client->recv($bkserv,128);
$client->recv($bkuser,128);
$client->recv($dumppath,128);
$client->recv($dumpnam
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 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.
- Stream large amounts of data, IE tar to
was just wondering what is the difference
> and preferred way ?
I would strongly recommend IO::Socket over Socket for a production
application; the former does a much better job of encapsulating the gory
details. (One simple example: it remembers to turn on autoflush for your
sockets, which is a
greetings,
I'm attempting a perl program that will listen on a port for a connection.
when a connection is made some info will be transfered and the client will
disconnect.
I've never done this before but seem to be making some progress with all the
resources available on the net. I was just w
Hello list,
I've been playing with sockets a bit lately.
I've studied and run this client/server example:
http://www.qiksearch.com/articles/perl_sockets.htm
I've been looking at
http://hotwired.lycos.com/webmonkey/97/18/index2a_page2.html?tw=programming
also trying to wrap
[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
I get an unknown error from the command prompt.
My goal was to fetch a list of numbers for the socket port.
Maybe it's just an XP problem ??
#!perl -w
my$hostprog = 'localhost';
if(open(LOG, ">>./log.txt")){
}else{print "Couldn't open LOG";}
use IO::Socket;
use LWP::Simple;
#get a list of socket n
[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
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
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
TECTED]
Subject:Re: Perl 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 HPUX 11.0 system? I am in need of this! I have looked into
system
>calls such as mknod and mkf
PROTECTED]
Sent: Friday, January 09, 2004 4:39 PM
To: Goffredo Saffioti
Cc: [EMAIL PROTECTED]
Subject: Re: Perl sockets on an HPUX
Great where do I get this IO::Socket module?
thank you
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Goffredo Saffioti <[EMAIL PROTECTED]>
01/09/2004 12
Great where do I get this IO::Socket module?
thank you
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Goffredo Saffioti <[EMAIL PROTECTED]>
01/09/2004 12:52 PM
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: Perl sockets on a
[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
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.
Thanks!
Derek B. Smith
OhioHealth
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
om Kinzer
Long Beach, California
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 2:12 PM
To: begin begin
Subject: Sockets and Daemonizing - was Re: Count the no of times a
script is called
On Wednesday, Nov 26, 2003, at 13:28 US/Pacific, T
On Wednesday, Nov 26, 2003, at 13:28 US/Pacific, Tom Kinzer wrote:
drieux suggests:
The alternative of course would be to have
the 'perl code' start up as a daemon that
handled requests on a socket, this way you
would save the 'start up' overhead of
invoking a new process each time through.
Make s
>
> 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 sig
"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
In the documentation of socket appears the fllowing:
$sockaddr = 'S n a4 x8'
What means this???
Thanks...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
eev-A19514; [EMAIL PROTECTED]
Subject: RE: Help !!! on sockets
> When I print the @buffer outside the while loop , I am not
> getting the output.
>
> Note : The commented line i.e. #print "Server: $_"; works and
> prints all the lines read from the socket.
>
>
> When I print the @buffer outside the while loop , I am not
> getting the output.
>
> Note : The commented line i.e. #print "Server: $_"; works and
> prints all the lines read from the socket.
>
> Please somebody tell me what error have I been making.
>
> Regards
> Rajeev
>
Hi ,
I have done a silly mistake which am not able to detect.
Below is a subroutine, that takes the Socket_Handle and the Message as arguments.
First i send the message and then I start reading the Socket in a while loop until
DONE is detected.
I am pushing each line in a @buffer.
When I print
>
> use IO::Socket;
>
> $server_port = 514;
>
> $server = IO::Socket::INET -> new(LocalPort => $server_port,
> Proto => "udp")
> or die "Couldn't be a udp server on port $server_port : [EMAIL PROTECTED]";
>
> while ($him = $server ->recv($datagram, 1024)) {
>
> ($portn
Hello,
I have developed an UDP server and I need to know the ip address of the
remote peer. This is the code:
use IO::Socket;
$server_port = 514;
$server = IO::Socket::INET -> new(LocalPort => $server_port, Proto => "udp")
or die "Couldn't be a udp server on port $server_port : [EMAIL PROTECTED]
"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
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
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
> > $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
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
> > > 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
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
> > $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
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
>
> 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]
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 h
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';
$port = 6668;
$proto = getprotoby
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
> 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',
>
> 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
ells, Dave [mailto:Dave.Sorrells@;usa.xerox.com]
Sent: Thursday, November 14, 2002 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: Sockets
Hey all,
I'm trying to learn a bit about Perl sockets. I got these simple
client/server scripts from http://www.perlfect.com/articles/sockets.shtml
and I can'
Hey all,
I'm trying to learn a bit about Perl sockets. I got these simple
client/server scripts from http://www.perlfect.com/articles/sockets.shtml
and I can't even get them to work. When I run the client against the server
I get no output at the server. The "Socket defined" l
Jessee Parker wrote:
>Is there a way to keep track of the number of open sockets your program might have
>that are in a TIME_WAIT (I think it is) state?
>
>
>
If you want can trye this script for to track the socket open on the
ports feel free for every change that you w
On Tue, Oct 08, 2002 at 09:59:16AM -0700, Jessee Parker wrote:
> Is there a way to keep track of the number of open sockets your program
> might have that are in a TIME_WAIT (I think it is) state?
The problem is if a socket is in a TIME_WAIT state it's no longer open by
your program.
you can always parse netstat , and have it refresh (sleep and loop) every
few seconds
> -Original Message-
> From: Jessee Parker [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 08, 2002 12:59 PM
> To: [EMAIL PROTECTED]
> Subject: Number of open sockets
>
>
>
ep track of the number of open sockets your program might
>have that are in a TIME_WAIT (I think it is) state?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 151 matches
Mail list logo