- SEE ALSO
XAS::Lib::Net::Client - The network client interface for the XAS environment
my $rpc = XAS::Lib::Net::Client->new( -port => 9505, -host => 'localhost', };
This module implements a simple text orientated network protocol. All "packets" will have an explicit "\015\012" appended. This delineates the "packets" and is network neutral. No attempt is made to decipher these "packets".
This initializes the module and can take these parameters. It doesn't actually make a network connection.
The port number to attach too.
The host to use for the connection. This can be an IP address or a host name.
An optional timeout, it defaults to 60 seconds.
An optional eol. The default is "\015\012". Which is network netural.
Turns on TCP keepalive for each connection.
Connect to the defined socket.
Disconnect from the defined socket.
This writes a buffer to the socket. Returns the number of bytes written.
This writes a buffer that is terminated with eol to the socket. Returns the number of bytes written.
This block reads data from the socket. A buffer is returned when it reaches $length or timeout.
This reads a buffer delimited by the eol from the socket.
This returns the size of the internal read buffer.
A class method to return the error number.
A class method to return the error string.
Kevin L. Esteb, <email@example.com>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.