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

Net::HL7::Daemon

SYNOPSIS

my $d = new Net::HL7::Daemon( LocalPort => 12002, Listen => 5 );

METHODS

$d = new Net::HL7::Daemon()

Create a new instance of the Daemon class. Arguments are the same as for the IO::Socket::INET.

$c = $d->accept([$pkg])

This method is the same as IO::Socket::accept but returns an Net::HL7::Daemon::Client reference. It returns undef if you specify a timeout and no connection is made within that time. In a scalar context the returned value will be a reference to a object of the Net::HL7::Daemon::Client class which is another IO::Socket::INET subclass. In a list context a two-element array is returned containing the new Net::HL7::Daemon::Client reference and the peer address; the list will be empty upon failure.

$d->getHost()

Returns the host where this daemon can be reached

$d->getPort()

Returns the port on which this daemon is listening

DESCRIPTION

The Net::HL7::Daemon::Client is also a IO::Socket::INET subclass. Instances of this class are returned by the accept() method of Net::HL7::Daemon. The following additional methods are provided:

$c->getMessage()

Read data from the socket and turn it into an Net::HL7::Request object which is then returned. It returns undef if reading of the request fails. If it fails, then the Net::HL7::Daemon::Client object ($c) should be discarded, and you should not call this method again.

$c->sendAck()

Write a Net::HL7::Messages::ACK object to the client as a response.

$c->sendNack($req, [$msg])

Write a Net::HL7::Messages::ACK object to the client as a response, with the Acknowledge Code (MSA(1)) set to CE or AE.

$c->sendResponse($res)

Write a Net::HL7::Reponse object to the client as a response.

RFC 2068

IO::Socket::INET

COPYRIGHT

Copyright 2003, D.A.Dokter

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 109:

=pod directives shouldn't be over one line long! Ignoring all 2 lines of content

Around line 196:

'=item' outside of any '=over'

Around line 212:

=pod directives shouldn't be over one line long! Ignoring all 2 lines of content

Around line 219:

You forgot a '=back' before '=head1'