The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::SIGTRAN::SCTP - An implementation to access to lksctp to provide sctp implementation in perl.

Server Example

use Net::SIGTRAN::SCTP; use threads;

my $server=new Net::SIGTRAN::SCTP( PORT=>12345 ); my $ssock=$server->bind(); if ($ssock) { my $csock; while($csock = $server->accept($ssock)) { print "New Client Connection\n"; my $thr=threads->create(\&processRequest,$server,$csock); $thr->detach(); } }

sub processRequest { my $connection=shift; my $socket=shift; my ($readlen,$buffer)= $connection->recieve($socket,1000); print "Recieved ($readlen,$buffer)\n"; }

Client Example

use Net::SIGTRAN::SCTP;

my $textstring='Hello World'; my $client=new Net::SIGTRAN::SCTP( HOST=>'127.0.0.1', PORT=>12345 );

my $csock=$client->connect();

$client->send($csock,0,length($textstring),$textstring); $client->close($csock);

AUTHOR

Christopherus Goo <software@artofmobile.com>

COPYRIGHT

Copyright (c) 2012 Christopherus Goo. All rights reserved. This software may be used and modified freely, but I do request that this copyright notice remain attached to the file. You may modify this module as you wish, but if you redistribute a modified version, please attach a note listing the modifications you have made.