Perl socket question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl socket question
# 1  
Old 03-16-2010
Perl socket question

Hi there, Really quick question that I have been unable to find an answer for on the web is simply, can use the newer IO::Socket module on my sever process and use the older perl built-in "socket" module to connect to the IO:socket?

or do i need to have the same module (be it socket or IO:Socket) on both client AND server

any help on this would be greatly appreciated, thanks
# 2  
Old 03-17-2010
MySQL

Not necessary to use same module in both server and client.
You can use different modules.
But sending and receiving a packet between server and client should be proper.

Even you can have server in Perl and client in C.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[PERL] Check if socket is connected before sending data

Hello community, I'm programming a simple code using socket connection in perl: $sock = new IO::Socket::INET( PeerAddr => '192.168.10.7', PeerPort => 8000, Proto => 'tcp'); $sock or die "no socket :$!";Then sending data using a loop: ... (1 Reply)
Discussion started by: Lord Spectre
1 Replies

2. Shell Programming and Scripting

Socket Programming in Perl

Hi All I am getting an error when using the below code Receiver use IO::Socket; $sock = new IO::Socket::INET (LocalHost => 'goldengate', LocalPort => 1200, Proto => 'tcp', Listen => 5, Reuse => 1 ); die "Socket could not be created. Reason: $!" unless $sock; while ($new_sock =... (5 Replies)
Discussion started by: parthmittal2007
5 Replies

3. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies

4. Programming

perl socket issue

Hi I am teaching myself perl and am writing a socket application to get experience. I am using Eclipse with the EPIC plugin to run the code in debug mode. I think that sometimes the script is not releasing the port if I terminate it in debug mode as I am occasionally getting the message: - ... (3 Replies)
Discussion started by: steadyonabix
3 Replies

5. Programming

Error with socket operation on non-socket

Dear Experts, i am compiling my code in suse 4.1 which is compiling fine, but at runtime it is showing me for socket programming error no 88 as i searched in errno.h it is telling me socket operation on non socket, what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies

6. Programming

socket function to read a webpage (socket.h)

Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct... #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include... (3 Replies)
Discussion started by: cyler
3 Replies

7. Shell Programming and Scripting

perl socket

Hello there: What is default value of listen if I, avoid init it on constructor. I need maximum num for Listen. I want to write a daemon thus i need unlimited listen. my $sock = IO::Socket::INET->new( Listen => 20, LocalPort => $port, Reuse => 1) Thanks in advance. (3 Replies)
Discussion started by: Zaxon
3 Replies

8. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

9. Shell Programming and Scripting

simple socket programming in perl

hi i want to write simple socket program which will listen on socket . here is the code ## read msg on socket #! /usr/bin/perl use IO::Socket::INET; my $MySocket= IO::Socket::INET->new(LocalPort=>1234, Proto=>'udp') ; while ()... (2 Replies)
Discussion started by: zedex
2 Replies

10. Programming

Socket Question

I understand all sockets programming until it comes to this level: int read (int fd, char* buffer, size_t size); /* if i am right */ int write(int fd, char* buffer, size_t size); My question is that: in my case I need to pass a structure between server and client, how to do that ??? (in other... (6 Replies)
Discussion started by: Agent007
6 Replies
Login or Register to Ask a Question