Lines Matching defs:socket

71 C<IO::Socket::IP> - Family-neutral IP socket supporting both IPv4 and IPv6
81 ) or die "Cannot construct socket - $@";
118 ) or die "Cannot create socket - $@\n";
120 print "Created a socket of type " . ref($sock) . "\n";
154 socket my $testsock, Socket::PF_INET6(), SOCK_STREAM, 0 or
155 die "Cannot socket(PF_INET6) - $!";
183 Creates a new C<IO::Socket::IP> object, containing a newly created socket
241 The socket type to pass to C<getaddrinfo> (e.g. C<SOCK_STREAM>,
247 The IP protocol to use for the socket (e.g. C<'tcp'>, C<IPPROTO_TCP>,
263 If defined, puts the socket into listening mode where new connections can be
281 An optional array of other socket options to apply after the three listed
298 to the given value. If true, a listening-mode socket will only listen on the
302 If not defined, the socket option will not be changed, and default value set
330 If defined but false, the socket will be set to non-blocking mode. Otherwise
359 socket family to create. In this case, it performs a C<getaddinfo> call with
595 # If there was a Family hint then create a plain unbound, unconnected socket
650 $self->socket( @{$info}{qw( family socktype protocol )} ) or
838 socket address given by the C<sockname> method).
905 socket address given by the C<peername> method), similar to the
981 sub socket :method
984 return $self->SUPER::socket(@_) if not defined $self->fileno;
987 socket( my $tmph, $_[0], $_[1], $_[2] ) or return undef;
1014 The new object will wrap the same underlying socket filehandle as the
1019 This method checks that the socket domain is C<PF_INET> and will throw an
1027 croak "Cannot downgrade a non-PF_INET socket to IO::Socket::INET" unless $self->sockdomain == AF_INET;
1034 argument then the socket is put into non-blocking mode. When in non-blocking
1035 mode, the socket will not be set up by the time the constructor returns,
1053 Once the socket has been connected to the peer, C<connect> will return true
1054 and the socket will now be ready to use.
1070 my $socket = IO::Socket::IP->new(
1073 ) or die "Cannot construct socket - $@";
1075 while( !$socket->connect and ( $! == EINPROGRESS || $! == EWOULDBLOCK ) ) {
1077 vec( $wvec, fileno $socket, 1 ) = 1;
1079 vec( $evec, fileno $socket, 1 ) = 1;
1089 analogously. C<IO::Socket::IP> takes care when creating new socket filehandles
1091 or C<epoll> should be transparent to its reallocation of a different socket
1247 caller asked for a non-blocking socket. This is not explicitly specified in
1252 non-blocking socket is requested, no operation will block. The C<Timeout>
1259 socket into nonblocking mode.