The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XAS::Lib::Net::Client - The network client interface for the XAS environment

SYNOPSIS

 my $rpc = XAS::Lib::Net::Client->new(
   -port => 9505,
   -host => 'localhost',
 };

DESCRIPTION

This module implements a simple text orientated network protocol. All "packets" will have an explicit "\012\015" appended. This delineates the "packets" and is network neutral. No attempt is made to decipher these "packets".

METHODS

new

This initializes the module and can take three parameters. It doesn't actually make a network connection.

-port

The port number to attach too.

-host

The host to use for the connection. This can be an IP address or a host name.

-timeout

An optional timeout, it defaults to 60 seconds.

connect

Connect to the defined socket.

disconnect

Disconnect from the defined socket.

put($packet)

This writes a "packet" to the socket.

$packet

The "packet" to send over the socket.

get

This reads a "packet" from the socket.

SEE ALSO

XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.