10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
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