/[cwmp]/google/trunk/lib/CWMP/Session.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/trunk/lib/CWMP/Session.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 204 by dpavlin, Wed Nov 14 21:52:45 2007 UTC revision 205 by dpavlin, Wed Nov 14 23:02:17 2007 UTC
# Line 8  use base qw/Class::Accessor/; Line 8  use base qw/Class::Accessor/;
8  __PACKAGE__->mk_accessors( qw/  __PACKAGE__->mk_accessors( qw/
9  debug  debug
10  create_dump  create_dump
11  store  session
12    
13  sock  sock
14  state  state
# Line 34  CWMP::Session - implement logic of CWMP Line 34  CWMP::Session - implement logic of CWMP
34    
35    my $server = CWMP::Session->new({    my $server = CWMP::Session->new({
36          sock => $io_socket_object,          sock => $io_socket_object,
37          store => 'state.db',          store => { ... },
38          debug => 1,          debug => 1,
39          create_dump => 1,          create_dump => 1,
40    });    });
# Line 46  sub new { Line 46  sub new {
46          my $self = $class->SUPER::new( @_ );          my $self = $class->SUPER::new( @_ );
47    
48          confess "need sock" unless $self->sock;          confess "need sock" unless $self->sock;
49            confess "need store" unless $self->store;
50            my $peerhost = $self->sock->peerhost || confess "can't get sock->peerhost";
51    
52          $self->debug( 0 ) unless $self->debug;          $self->debug( 0 ) unless $self->debug;
53    
54          warn "created ", __PACKAGE__, "(", dump( @_ ), ") for ", $self->sock->peerhost, "\n" if $self->debug;          warn "created ", __PACKAGE__, "(", dump( @_ ), ") for $peerhost\n" if $self->debug;
55    
56          my $store_obj = CWMP::Store->new({          my $store_obj = CWMP::Store->new({
57                  debug => $self->debug,                  debug => $self->debug,

Legend:
Removed from v.204  
changed lines
  Added in v.205

  ViewVC Help
Powered by ViewVC 1.1.26