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

GSM::SMS::Transport - Act as a single point of access to the transports

DESCRIPTION

This class implements an object factory for the transports found in the GSM::SMS::Transport:: namespace. Given a transport config file, it will dynamically loads the transports and initialize them. It will keep a reference to all instantiated transports.

METHODS

new - Constructor

Create a new transport layer with the settings as in the config file. Please look in the example config file for the transport specific configuration settings.

send - Send a PDU message.

Send a PDU message to the the msisdn. The transport layer will choose a transport according to the regular expression defined in the config file. This regexp matches against the msisdn.

$transport->send( $msisdn, $pdu );
receive - Receive a PDU message

Receive a pdu message from the transport layer. Undef when no new message available.

$pdu = $transport->receive();
get_transports - Return an array containg the transports
@transports = $transport->get_transports();
foreach my $i (@transports) {
	print $i->ping();
}
add_transport - Push a transport on the transport stack
close

Shut down transport layer, calls the transport specific close method.

AUTHOR

Johan Van den Brande <johan@vandenbrande.com>