IO::Socket::UNIX - Online Linux Manual PageSection : 3pm
Updated : 2023-01-19
Source : perl v5.36.0
Note : Perl Programmers Reference Guide
NAMEIO::Socket::UNIX − Object interface for AF_UNIX domain sockets
SYNOPSIS use IO::Socket::UNIX;
my $SOCK_PATH = "$ENV{HOME}/unix−domain−socket−test.sock";
# Server:
my $server = IO::Socket::UNIX−>new(
Type => SOCK_STREAM(),
Local => $SOCK_PATH,
Listen => 1,
);
my $count = 1;
while (my $conn = $server−>accept()) {
$conn−>print("Hello " . ($count++) . "\n");
}
# Client:
my $client = IO::Socket::UNIX−>new(
Type => SOCK_STREAM(),
Peer => $SOCK_PATH,
);
# Now read and write from $client
DESCRIPTIONIO::Socket::UNIX provides an object interface to creating and using sockets in the AF_UNIX domain. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket.
CONSTRUCTORnew ( [ARGS] ) Creates an IO::Socket::UNIX object, which is a reference to a newly created symbol (see the Symbol package). new optionally takes arguments, these arguments are in key-value pairs. In addition to the key-value pairs accepted by IO::Socket, IO::Socket::UNIX provides. Type Type of socket (eg SOCK_STREAM or SOCK_DGRAM)
Local Path to local fifo
Peer Path to peer fifo
Listen Queue size for listen
If the constructor is only passed a single argument, it is assumed to be a Peer specification. If the Listen argument is given, but false, the queue size will be set to 5. If the constructor fails it will return undef and set the $IO::Socket::errstr package variable to contain an error message. $sock = IO::Socket::UNIX−>new(...)
or die "Cannot create socket − $IO::Socket::errstr\n";
For legacy reasons the error message is also set into the global $@ variable, and you may still find older code which looks here instead. $sock = IO::Socket::UNIX−>new(...)
or die "Cannot create socket − $@\n";
METHODShostpath() Returns the pathname to the fifo at the local end peerpath() Returns the pathanme to the fifo at the peer end
SEE ALSOSocket, IO::Socket
AUTHORGraham Barr. Currently maintained by the Perl Porters. Please report all bugs at <https://github.com/Perl/perl5/issues>.
COPYRIGHTCopyright (c) 1996−8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 0
Johanes Gumabo
Data Size : 9,619 byte
man-IO::Socket::UNIX.3pmBuild : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 257,263
Visitor ID : :
Visitor IP : 18.217.141.236 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|252|IO::Socket::UNIX.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|IO::Socket::UNIX.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|252|IO::Socket::UNIX.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|IO::Socket::UNIX.3pm|43|'br══─}─══ |'br══─}─══
)