Zoffix Znet > Net-OBEX-1.001001 > Net::OBEX::Packet::Request

Download:
Net-OBEX-1.001001.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.001001   Source  

NAME ^

Net::OBEX::Packet::Request - create OBEX protocol request packets.

SYNOPSIS ^

    use Net::OBEX::Packet::Request;
    use Net::OBEX::Packet::Headers;

    my $head = Net::OBEX::Packet::Headers->new;
    my $req = Net::OBEX::Packet::Request->new;

    my $obexftp_target
    = $head->make( target  => pack 'H*', 'F9EC7BC4953C11D2984E525400DC9E09');

    my $connect_packet = $req->make(
        packet  => 'connect',
        headers => [ $obexftp_target ],
    );

    # send $connect_packet down the wire

    my $disconnect_packet = $req->make( packet => 'disconnect' );
    # this one can go too now.

DESCRIPTION ^

WARNING!!! This module is in an early alpha stage. It is recommended that you use it only for testing.

The module provides means to create raw OBEX packets ready to go down the wire. The module does not provide Headers creation, to create packet headers use Net::OBEX::Packet::Headers

CONSTRUCTOR ^

new

    my $req = Net::OBEX::Packet::Request->new;

Takes no arguments, returns a freshly baked Net::OBEX::Packet::Request object ready for request packet production.

METHODS ^

make

    my $connect_packet = $req->make(
        packet  => 'connect',
        headers => [ $obexftp_target ],
    );

    my $disconnect_packet = $req->make( packet => 'disconnect' );

Takes several name/value arguments. The packet argument indicates which packet to construct, the rest of the arguments will go directly into a specific packet's constructor (new()) method. The following is a list of valid packet argument values with a corresponding module, read the documentation of that module's constructor to find out the rest of the possible arguments to make() method.

connect

Will make OBEX Connect packet, see Net::OBEX::Packet::Request::Connect

disconnect

Will make OBEX Disconnect packet, see Net::OBEX::Packet::Request::Disconnect

setpath

Will make OBEX SetPath packet, see Net::OBEX::Packet::Request::SetPath

get

Will make OBEX Get packet, see Net::OBEX::Packet::Request::Get

put

Will make OBEX Get packet, see Net::OBEX::Packet::Request::Put

abort

Will make OBEX Abort packet, see Net::OBEX::Packet::Request::Abort

The rest of packets are yet to be implemented.

REPOSITORY ^

Fork this module on GitHub: https://github.com/zoffixznet/Net-OBEX

BUGS ^

To report bugs or request features, please use https://github.com/zoffixznet/Net-OBEX/issues

If you can't access GitHub, you can email your request to bug-Net-OBEX at rt.cpan.org

AUTHOR ^

Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)

LICENSE ^

You can use and distribute this module under the same terms as Perl itself. See the LICENSE file included in this distribution for complete details.

syntax highlighting: