Lines Matching defs:socket
63 C<IO::Socket::IP> - Family-neutral IP socket supporting both IPv4 and IPv6
73 ) or die "Cannot construct socket - $IO::Socket::errstr";
110 ) or die "Cannot create socket - $IO::Socket::errstr\n";
112 print "Created a socket of type " . ref($sock) . "\n";
146 socket my $testsock, Socket::PF_INET6(), SOCK_STREAM, 0 or
147 die "Cannot socket(PF_INET6) - $!";
175 Creates a new C<IO::Socket::IP> object, containing a newly created socket
233 The socket type to pass to C<getaddrinfo> (e.g. C<SOCK_STREAM>,
239 The IP protocol to use for the socket (e.g. C<'tcp'>, C<IPPROTO_TCP>,
255 If defined, puts the socket into listening mode where new connections can be
273 An optional array of other socket options to apply after the three listed
290 to the given value. If true, a listening-mode socket will only listen on the
294 If not defined, the socket option will not be changed, and default value set
322 If defined but false, the socket will be set to non-blocking mode. Otherwise
351 socket family to create. In this case, it performs a C<getaddinfo> call with
587 # If there was a Family hint then create a plain unbound, unconnected socket
642 $self->socket( @{$info}{qw( family socktype protocol )} ) or
833 socket address given by the C<sockname> method).
900 socket address given by the C<peername> method), similar to the
976 sub socket :method
979 return $self->SUPER::socket(@_) if not defined $self->fileno;
982 socket( my $tmph, $_[0], $_[1], $_[2] ) or return undef;
1009 The new object will wrap the same underlying socket filehandle as the
1014 This method checks that the socket domain is C<PF_INET> and will throw an
1022 croak "Cannot downgrade a non-PF_INET socket to IO::Socket::INET" unless $self->sockdomain == AF_INET;
1029 argument then the socket is put into non-blocking mode. When in non-blocking
1030 mode, the socket will not be set up by the time the constructor returns,
1048 Once the socket has been connected to the peer, C<connect> will return true
1049 and the socket will now be ready to use.
1065 my $socket = IO::Socket::IP->new(
1068 ) or die "Cannot construct socket - $@";
1070 while( !$socket->connect and ( $! == EINPROGRESS || $! == EWOULDBLOCK ) ) {
1072 vec( $wvec, fileno $socket, 1 ) = 1;
1074 vec( $evec, fileno $socket, 1 ) = 1;
1084 analogously. C<IO::Socket::IP> takes care when creating new socket filehandles
1086 or C<epoll> should be transparent to its reallocation of a different socket
1242 caller asked for a non-blocking socket. This is not explicitly specified in
1247 non-blocking socket is requested, no operation will block. The C<Timeout>
1254 socket into nonblocking mode.