LWP::SecureSocket man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]



lib::LWP::SecurUserkContributed Perl Doclib::LWP::SecureSocket(3)

NAME
       LWP::SecureSocket - SSL TCP/IP socket interface

SYNOPSIS
	$socket = new LWP::SecureSocket;
	$socket->connect('localhost', 7); # echo
	$quote = 'I dunno, I dream in Perl sometimes...';
	$socket->write("$quote\n");
	$socket->read_until("\n", \$buffer);
	$socket->read(\$buffer);
	$socket = undef;  # close

DESCRIPTION
       This class implements TCP/IP sockets.  It groups socket
       generation, TCP address manipulation and buffered reading.
       Errors are handled by dying (throws exceptions).

       This class should really not be required, something like
       this should be part of the standard Perl5 library.

       Running this module standalone executes a self test which
       requires localhost to serve chargen and echo protocols.

METHODS
       $sock = new LWP::SecureSocket()

       Constructs a new socket object.

       $sock->connect($host, $port)

       Connect the socket to given host and port.

       $sock->shutdown()

       Shuts down the connection.

       $sock->bind($host, $port)

       Binds a name to the socket.

       $sock->listen($queuesize)

       Set up listen queue for socket.

       $sock->accept($timeout)

       Accepts a new connection.  Returns a new LWP::SecureSocket
       object if successful.  Timeout not implemented yet.  would
       require modifying new, and not
	   necessary for app, so I\'m not bothering to modify.
       Might work anyways, though.

24/Aug/1997	       perl 5.005, patch 03			1

lib::LWP::SecurUserkContributed Perl Doclib::LWP::SecureSocket(3)

       $sock->getsockname()

       Returns a 2 element array ($host, $port)

       $sock->read_until($delim, $data_ref, $size, $timeout)

       Reads data from the socket, up to a delimiter specified by
       a regular expression.  If $delim is undefined all data is
       read.  If $size is defined, data will be read internally
       in chunks of $size bytes.  This does not mean that we will
       return the data when size bytes are read.

       Note that $delim is discarded from the data returned.

       $sock->read($bufref, [$size, $timeout])

       Reads data of the socket.  Not more than $size bytes.
       Might return less if the data is available.  Dies on
       timeout.

       $sock->pushback($data)

       Put data back into the socket.  Data will returned next
       time you read().	 Can be used if you find out that you
       have read too much.

       $sock->write($data, [$timeout])

       Write data to socket.  The $data argument might be a
       scalar or code.

       If data is a reference to a subroutine, then we will call
       this routine to obtain the data to be written.  The
       routine will be called until it returns undef or empty
       data.  Data might be returned from the callback as a
       scalar or as a reference to a scalar.

       Write returns the number of bytes written to the socket.

       _getaddress($h, $p)

       Given a host and a port, it will return the address
       (sockaddr_in) suitable as the name argument for connect()
       or bind(). Might return several addresses in array context
       if the hostname is bound to several IP addresses.

SELF TEST
       This self test is only executed when this file is run
       standalone. It tests its functions against some standard
       TCP services implemented by inetd. If you do not have them
       around the tests will fail.

24/Aug/1997	       perl 5.005, patch 03			2

lib::LWP::SecurUserkContributed Perl Doclib::LWP::SecureSocket(3)

24/Aug/1997	       perl 5.005, patch 03			3

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net