NAME
Net::Socket - TEMPORARY Socket filedescriptor class, so Net::FTP still works while IO::Socket is having a re-fit <GBARR>
DESCRIPTION
NO TEXT --- THIS MODULE IS TEMPORARY
new( %args )
The new constructor takes its arguments in the form of a hash. Accepted arguments are
Peer => remote host name for a 'connect' socket
Proto => specifiy protocol by it self (but override by Service)
Service => require service eg 'ftp' or 'ftp/tcp', overrides Proto
Port => port num for connect eg 'ftp' or 21, defaults to Service
Bind => port to bind to, defaults to INADDR_ANY
Listen => queue size for listen
autoflush( [$val] )
Set the file descriptor to autoflush, depending on $val
accept
perform the system call accept
on the socket and return a new Net::Socket object. This object can be used to communicate with the client that was trying to connect.
close
Close the file descriptor
dup
Create a duplicate of the socket object
sockname
Return a packed sockaddr structure for the socket
sockaddr
Return the address part of the sockaddr structure for the socket
sockport
Return the port number that the socket is using on the local host
sockhost
Return the address part of the sockaddr structure for the socket in a text form xx.xx.xx.xx
peername, peeraddr, peerport, peerhost
Same as for the sock* functions, but returns the data about the peer host instead of the local host.
send( $buf [, $flags [, $to]] )
For a udp socket, send the contents of $buf
to the remote host $to
using flags $flags
.
If $to
is not specified then the data is sent to the host which the socket last communicated with, ie sent to or recieved from.
If $flags
is ommited then 0 is used
recv( $buf, $len [, $flags] )
Receive $len
bytes of data from the socket and place into $buf
If $flags
is ommited then 0 is used
AUTHOR
Graham Barr <Graham.Barr@tiuk.ti.com>
REVISION
$Revision: 1.2 $
COPYRIGHT
Copyright (c) 1995 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.