Agent-TCLI-Package-Net

 view release on metacpan or  search on metacpan

lib/Agent/TCLI/Package/Net/HTTP.pm  view on Meta::CPAN

  		timeout      => 120, 	# defaults to 120
	));

	$self->set(\@poco_http , POE::Component::Client::HTTP->spawn(
		Agent     => $self->user_agents,
		Alias     => 'http-client',                  # defaults to 'weeble'
		ConnectionManager => $poco_cm[$$self],
#		From      => 'spiffster@perl.org',  # defaults to undef (no header)
#		CookieJar => $cookie_jar,
#		Protocol  => 'HTTP/1.1',            # defaults to 'HTTP/1.1'
#		Timeout   => 180,                    # defaults to 180 seconds
#		MaxSize   => 16384,                 # defaults to entire response
#		Streaming => 4096,                  # defaults to 0 (off)
#		FollowRedirects => 2                # defaults to 0 (off)
#		Proxy     => "http://localhost:80", # defaults to HTTP_PROXY env. variable
# 		NoProxy   => [ "localhost", "127.0.0.1" ], # defs to NO_PROXY env. variable
	));

	$self->Verbose(" Dump ".$self->dump(1),3 );

}

lib/Agent/TCLI/Package/Net/Ping.pm  view on Meta::CPAN


	# There is only one command object per TCLI
    $kernel->alias_set($self->name);

	# Keep the pinger session so we can shut it down

	# Create a pinger component.
#	$self->set(\@poco_pinger,
	POE::Component::Client::Ping->spawn(
    	Alias   	=> 'pinger',    # This is the name it'll be known by.
    	Timeout 	=> 10,          # This is how long it waits for echo replies.
    	OneReply	=> 1,			# Only tell us when success or timeout
	);

	return($self->name.":_start complete ");
} #end start

sub _stop {
    my ($kernel,  $self,) =
      @_[KERNEL, OBJECT,];
	$self->Verbose("_stop: ".$self->name." stopping",2);

lib/Agent/TCLI/Package/Net/SMTP.pm  view on Meta::CPAN

    in which case you need to set this parameter to the correct
    value to match your setup.
  type: Param
---
Agent::TCLI::Parameter:
  name: timeout
  constraints:
    - UINT
  class: numeric
  default: 30
  help: Timeout in seconds
  manual: >
    The timeout in seconds for the SMTP transaction. The default is 30 seconds.
  type: Param
---
Agent::TCLI::Parameter:
  name: textfile
  constraints:
    - ASCII
  help: A file of plain text for the message body.
  manual: >

lib/Agent/TCLI/Package/Net/SMTP.pm  view on Meta::CPAN


	POE::Component::Client::SMTP->send(
		# Email related parameters
		From    => $param->{'from'},
		To      => $param->{'to'},
     	Body    => $body,

     	# server params
     	Port	=> $param->{'port'},
		Server  => $param->{'server'},
		Timeout => $param->{'timeout'},

		# POE related parameters
        Context			=> $request,
		Alias           => 'pococlsmtpX',
		SMTP_Success    => 'SendMailSuccess',
		SMTP_Failure    => 'SendMailFailure',
#		Debug			=>  0,
	);
}

lib/Agent/TCLI/Package/Net/Traceroute.pm  view on Meta::CPAN

	# There is only one command object per TCLI
    $kernel->alias_set($self->name);

	# Keep the pinger session so we can shut it down

	# Create a pinger component.
	POE::Component::Client::Traceroute->spawn(
    	Alias          => 'tracer',   # Defaults to tracer
    	FirstHop       => 1,          # Defaults to 1
    	MaxTTL         => 32,         # Defaults to 32 hops
    	Timeout        => 0,          # Defaults to never
    	QueryTimeout   => 3,          # Defaults to 3 seconds
    	Queries        => 3,          # Defaults to 3 queries per hop
    	BasePort       => 33434,      # Defaults to 33434
    	PacketLen      => 128,        # Defaults to 68
    	SourceAddress  => '0.0.0.0',  # Defaults to '0.0.0.0'
    	PerHopPostback => 0,          # Defaults to no PerHopPostback
    	Device         => undef,     # Defaults to undef
    	UseICMP        => 0,          # Defaults to 0
    	Debug          => 0,          # Defaults to 0
    	DebugSocket    => 0,          # Defaults to 0
	);

lib/Agent/TCLI/Package/Net/Traceroute.pm  view on Meta::CPAN

	{
		$self->Verbose('trace: argument error '.$txt);
		$request->Respond($kernel, $txt,412);
		return;
	}

	my @trace_options;
	push(@trace_options,
		'MaxTTL'   		=> $param->{'max_ttl'},
		'FirstHop' 		=> $param->{'firsthop'},
    	'Timeout'  		=> $param->{'timeout'},
    	'QueryTimeout'  => $param->{'querytimeout'},
    	'Queries'		=> $param->{'queries'},
    	'BasePort'		=> $param->{'baseport'},
 		);
	push(@trace_options,'PerHopPostBack','TraceHopResponse')
		if $param->{'trace_verbose'};

	push(@trace_options,'UseICMP',1)
		if ($param->{'useicmp'} || ($^O eq "MSWin32"));

  	$self->requests->{$param->{'target'}->addr}{'request'} = $request;

lib/Agent/TCLI/Package/Net/Traceroute.pm  view on Meta::CPAN

  type: Param
  class: numeric
---
Agent::TCLI::Parameter:
  name: timeout
  constraints:
    - UINT
  default: 0
  help: Set global timeout in seconds.
  manual: >
    Timeout sets the maximum time any given traceroute will run. After
    this time the traceroute will stop in the middle of where ever it
    is and a 'Traceroute session timeout' error is returned along with
    all of the data collected. Timeout defaults to 0, which disables
    it completely.
  type: Param
  class: numeric
---
Agent::TCLI::Parameter:
  name: querytimeout
  constraints:
    - UINT
  default: 3
  help: Set timeout for each query in seconds.



( run in 1.169 second using v1.01-cache-2.11-cpan-a5abf4f5562 )