Re: Perl; socket

2010-04-10 Thread Uri Guttman
> "Nz" == Niko zuna writes: Nz> #!/usr/bin/perl Nz> # Needed pkg no need for comments like that. Nz> use Getopt::Std; use Getopt::Long instead. you can still have short names but also long names. Nz> use strict "vars"; why 'vars'? just plain strict is better. Nz> # Global var

Perl; socket

2010-04-10 Thread Niko zuna
Hi, I have made a TCP socket, both a server and a client, and it works just fine, except from the fact that I cant receive more than one input line from the server when I execute a Unix command trough the socket. And when I am trying to send a ps command from the client to the server to count how m

Re: Perl Socket Client for C++ Server

2005-04-07 Thread Jay Savage
On Apr 7, 2005 2:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Jay, > > thanks for the answer. > > > Firt things first. Why did you comment out use strict? That's never > > a good sign. also, loading both IO::Socket::Unix and Socket probably > > isn't the best idea. the main proble

Re: Perl Socket Client for C++ Server

2005-04-07 Thread news-funsi
Hi Jay, thanks for the answer. > Firt things first. Why did you comment out use strict? That's never > a good sign. also, loading both IO::Socket::Unix and Socket probably > isn't the best idea. the main problem here, though would seem to be > mixing your syntax. You're calling the object-o

Re: Perl Socket Client for C++ Server

2005-04-06 Thread Jay Savage
On Apr 6, 2005 1:41 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > thanks zentara for the answer, but unfortunately this does not work. > > I've uploaded the the C++ server/client and the testclient for perl. > > after unpacking and compiling the fundaemon, the server executable is > src/fund

Re: Perl Socket Client for C++ Server

2005-04-06 Thread news-funsi
thanks zentara for the answer, but unfortunately this does not work. I've uploaded the the C++ server/client and the testclient for perl. after unpacking and compiling the fundaemon, the server executable is src/fundaemon, which will create a file called /tmp/fundaemon_socket and listens for clie

Perl Socket Client for C++ Server

2005-04-05 Thread news-funsi
Hi there, i have written a socket c++ server, which listens for clients and understands some commands. here the structs of the server commands: enum command { SET_PRIO, CLEAR, SEND_STRING, SET_CURSOR, SHOW_CURSOR }; struct string_packet_t { char str[DATA_LENGTH]; };

Re: Perl Socket

2005-01-13 Thread Mark Goland
- Original Message - From: "Groleo Marius" <[EMAIL PROTECTED]> To: Sent: Thursday, January 13, 2005 4:46 AM Subject: Perl Socket > Hi list! Hello Marius, > > im try-ing this code, to get a multi line server response: > > use Socket; > socket(sock, AF

Perl Socket

2005-01-13 Thread Groleo Marius
Hi list! im try-ing this code, to get a multi line server response: use Socket; socket(sock, AF_INET, SOCK_STREAM, getprotobyname('tcp')) || die "error: $!\n"; $dest = sockaddr_in($_[0], inet_aton($_[1])); connect(sock, $dest) || die "error: $!\n"; select(sock); while ($response=) {