view release on metacpan or search on metacpan
bin/proxy_that view on Meta::CPAN
=head1 DESCRIPTION
This utility starts a L<Plack> based proxy server that forwards requests
to one URL. It can create a throw-away SSL certificate and run over https,
which makes it easy to provide encrypted endpoints for local development
if your frontend has to run on https.
=head1 OPTIONS
The following options are available:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RoboBot/Plugin/API/Github.pm view on Meta::CPAN
my ($self, $repo) = @_;
# Update repo with polled_at = now() - 10 seconds, so that every time we
# poll GH, we're actually looking at a window of length(watcher_interval)
# offset 10 seconds in the past. This gives events on the GH side of things
# time to propogate to their API endpoints, so we don't miss out.
my $poll_t = $self->bot->config->db->do(q{
update github_repos
set polled_at = now() - interval '10 seconds'
where repo_id = ?
returning to_char(polled_at at time zone 'UTC','YYYY-MM-DD"T"HH24:MI:SS"Z"') as polled_at
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/sunix/transform/sugabor.pm view on Meta::CPAN
Optional parameters:
dt=(from header) time sampling interval (sec)
fmin=0 minimum frequency of filter array (hz)
fmax=NYQUIST maximum frequency of filter array (hz)
beta=3.0 ln[filter peak amp/filter endpoint amp]
band=.05*NYQUIST filter bandwidth (hz)
alpha=beta/band^2 filter width parameter
verbose=0 =1 supply additional info
holder=0 =1 output Holder regularity estimate
=2 output linear regularity estimate
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Spoor/Config.pm view on Meta::CPAN
transformer: bin/login_log_transformer.pl
transmission:
credentials:
api_identifier: api_identifier_goes_here
api_secret: api_secret_goes_here
endpoints:
report: /api/reports
host: https://spoor.capefox.co
=head1 SUBROUTINES/METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
examples/complex/lib/App/Standby/Cmd/Command/complex.pm view on Meta::CPAN
App::Standby::Cmd::Command::complex - Example for a command to be run as a cronjob
=head1 DESCRIPTION
This class implements an example for a cronjob that is run once a day to keep some
complex endpoint up-to-date.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TimeTracker/Command/Gitlab.pm view on Meta::CPAN
return $user->{id} if $user && $user->{id};
return;
}
sub _call {
my ($self,$method, $endpoint, $args) = @_;
my $url = $self->config->{gitlab}{url}.'/api/v4/'.$endpoint;
my $res = $self->gitlab_client->request($method,$url);
if ($res->{success}) {
my $data = decode_json($res->{content});
return $data;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TimeTracker/Command/Trello.pm view on Meta::CPAN
$self->config->{_used_config_files}->[0], 'local' );
}
}
sub _do_trello {
my ( $self, $method, $endpoint, @args ) = @_;
my $client = $self->trello_client;
exit 1 unless $client;
my $res = $client->$method( $endpoint, @args );
if ( $res->failed ) {
error_message(
"Cannot talk to Trello API: " . $res->error . ' ' . $res->code );
if ( $res->code == 401 ) {
say "Maybe running 'tracker setup_trello' will help...";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/WatchLater/YouTube.pm view on Meta::CPAN
} => $class;
}
=head2 request
my $body = $api->request($method, $endpoint, %params);
Send a request to the specified API endpoint using the given HTTP method. Query
parameters may be specified in C<%params>. Croaks if the request fails.
=cut
sub request {
my ($self, $method, $endpoint, %params) = @_;
my $url = 'https://www.googleapis.com/youtube/v3' . $endpoint;
my %headers;
if (defined $self->{token}) {
$headers{Authorization} = 'Bearer ' . $self->{token};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/coinbasepro/lite.pm view on Meta::CPAN
use Log::ger;
our %SPEC;
my %args_common = (
endpoint => {
schema => 'str*', # XXX uri
req => 1,
pos => 0,
},
args => {
lib/App/coinbasepro/lite.pm view on Meta::CPAN
sub public {
my %args = @_;
_init(\%args);
$clipub->public_request(
$args{method},
$args{endpoint},
$args{args},
);
}
$SPEC{private} = {
lib/App/coinbasepro/lite.pm view on Meta::CPAN
sub private {
my %args = @_;
_init(\%args);
$clipriv->private_request(
$args{method},
$args{endpoint},
$args{args},
);
}
1;
lib/App/coinbasepro/lite.pm view on Meta::CPAN
=over 4
=item * B<args> => I<hash>
=item * B<endpoint>* => I<str>
=item * B<key>* => I<str>
=item * B<method> => I<str> (default: "GET")
lib/App/coinbasepro/lite.pm view on Meta::CPAN
=over 4
=item * B<args> => I<hash>
=item * B<endpoint>* => I<str>
=item * B<method> => I<str> (default: "GET")
=back
view all matches for this distribution
view release on metacpan or search on metacpan
bin/colorcoke view on Meta::CPAN
my $DEBUG = $ENV{DEBUG};
our($opt_r_step, $opt_g_step, $opt_b_step) = (10) x 3;
our $opt_hex = '000000';
our $opt_starting_point = 17; # Start from 17
our $opt_endpoint = 231; # End at 231
our $opt_ansi_only = 0;
our $opt_random = 0;
our $opt_random_r = 256;
our $opt_random_g = 256;
our $opt_random_b = 256;
bin/colorcoke view on Meta::CPAN
'r|red:i' => \$opt_r_step,
'g|green:i' => \$opt_g_step,
'b|blue:i' => \$opt_b_step,
'1|single:s{2}' => \@opt_single_color,
's|start:i' => \$opt_starting_point,
'end:i' => \$opt_endpoint,
'ansi' => \$opt_ansi_only,
'random' => \$opt_random,
'rr|rand-red:i' => \$opt_random_r,
'rg|rand-green:i' => \$opt_random_g,
'rb|rand-blue:i' => \$opt_random_b,
bin/colorcoke view on Meta::CPAN
$r = hex($r);
$g = hex($g);
$b = hex($b);
$opt_starting_point = 0 if($opt_starting_point == 1); # Include ANSI
$opt_endpoint = 255 if($opt_endpoint == 1); # Include greyscale
if($opt_ansi_only) {
$opt_starting_point = 0;
$opt_endpoint = 16;
}
for ($opt_starting_point .. $opt_endpoint) {
if($opt_random) {
$r = int(rand($opt_random_r) % 256);
$g = int(rand($opt_random_g) % 256);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpan2arch/GetMetadata.pm view on Meta::CPAN
use File::Spec::Functions qw< catdir splitdir >;
use Scalar::Util qw< looks_like_number >;
our $VERSION = 'v1.1.2';
field %_endpoints :reader :writer = (
module => 'https://fastapi.metacpan.org/v1/module/',
release => 'https://fastapi.metacpan.org/v1/release/',
download => 'https://fastapi.metacpan.org/v1/download_url/',
);
field $_mua_mcpan :reader;
lib/App/cpan2arch/GetMetadata.pm view on Meta::CPAN
method _get_module ($module)
{
$self->_psub;
my $prog = $self->prog;
my $url = $_endpoints{module} . "$module?fields=distribution";
my $json;
my $res = do {
try {
my %env = $self->env;
lib/App/cpan2arch/GetMetadata.pm view on Meta::CPAN
$query
.= defined $version
? "version:$version"
: 'status:latest';
my $url = $_endpoints{release} . "_search?q=$query";
my $res = do {
try {
my %env = $self->env;
local $ENV{MUAC_NOCACHE} = true if $env{cache_ignore};
view all matches for this distribution
view release on metacpan or search on metacpan
1.59_06 Tue Feb 5 12:36:00 PST 2013
[Incompatible Changes]
- --mirror-index option doesn't automatically assume --mirror-only
[Improvements]
- Use versioned MetaCPAN API endpoint (oalders)
1.59_05 Mon Feb 4 11:49:40 PST 2013
[New Features]
- Support version ranges in command args and cpanfile queried agsinst MetaCPAN
with the proper version range query to get the best version that satisfies
view all matches for this distribution
view release on metacpan or search on metacpan
share/wordlist_en.tsv view on Meta::CPAN
25321 endnote
25322 endocrine
25323 endorphin
25324 endorse
25325 endowment
25326 endpoint
25331 endurable
25332 endurance
25333 enduring
25334 energetic
25335 energize
view all matches for this distribution
view release on metacpan or search on metacpan
share/man/man1/git-hub.1 view on Meta::CPAN
.Ve
.PP
to trust a list of users in one go.
.SH "Token Authentication and Scopes"
.IX Header "Token Authentication and Scopes"
Many endpoints of the GitHub v3 \s-1API\s0 require a Personal \s-1API\s0 Access Token. You can list your current tokens with this command:
.PP
.Vb 1
\& git hub tokens
.Ve
.PP
view all matches for this distribution
view release on metacpan or search on metacpan
currently it works with:
* fixed, hardcoded list of packages names
* Github GraphQL endpoint
view all matches for this distribution
view release on metacpan or search on metacpan
favor of App-cryp-exchange.
- Maintain list of pairs in App::cryp::Exchange::indodax instead of in
our dist.
- Update/fix API endpoint URL.
0.023 2018-04-06 (PERLANCAR)
- Add new pairs: ada_idr, bcd_idr.
view all matches for this distribution
view release on metacpan or search on metacpan
.claude/skills/getty-perl-pod/SKILL.md view on Meta::CPAN
=attr server
Required. L<Kubernetes::REST::Server> instance or hashref with the connection
configuration.
server => { endpoint => 'https://kubernetes.local:6443' }
=cut
sub list { ... }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/opan.pm view on Meta::CPAN
L</carton> commands with C<--autopin> sets this for you, because you already
specified you wanted that).
=head2 uploads
To enable the /upload endpoint, set the ENV var OPAN_AUTH_TOKENS to a colon
separated list of accepted tokens for uploads. This will allow a post with a
'file' upload argument, checking http basic auth password against the provided
auth tokens.
=head2 recurring pull
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/org2wp.pm view on Meta::CPAN
; use INI (IOD) format for this file
proxy=https://YOURBLOGNAME.wordpress.com/xmlrpc.php
username=YOURUSERNAME
password=YOURPASSWORD
Note that `proxy` is the endpoint URL of your WordPress instance's XML-RPC
server, which can be hosted on `wordpress.com` or on other server, including
your own. It has nothing to do with HTTP/HTTPS proxy; the term "proxy" is used
by the <pm:XMLRPC::Lite> and <pm:SOAP::Lite> Perl libraries and `org2wp` simply
uses the same terminology.
lib/App/org2wp.pm view on Meta::CPAN
req => 1,
description => <<'_',
Example: `https://YOURBLOGNAME.wordpress.com/xmlrpc.php`.
Note that `proxy` is the endpoint URL of your WordPress instance's XML-RPC
server, which can be hosted on `wordpress.com` or on other server, including
your own. It has nothing to do with HTTP/HTTPS proxy; the term "proxy" is used
by the <pm:XMLRPC::Lite> and <pm:SOAP::Lite> Perl libraries and `org2wp` simply
uses the same terminology.
lib/App/org2wp.pm view on Meta::CPAN
; use INI (IOD) format for this file
proxy=https://YOURBLOGNAME.wordpress.com/xmlrpc.php
username=YOURUSERNAME
password=YOURPASSWORD
Note that C<proxy> is the endpoint URL of your WordPress instance's XML-RPC
server, which can be hosted on C<wordpress.com> or on other server, including
your own. It has nothing to do with HTTP/HTTPS proxy; the term "proxy" is used
by the L<XMLRPC::Lite> and L<SOAP::Lite> Perl libraries and C<org2wp> simply
uses the same terminology.
lib/App/org2wp.pm view on Meta::CPAN
=item * B<proxy>* => I<str>
Example: CL<https://YOURBLOGNAME.wordpress.com/xmlrpc.php>.
Note that C<proxy> is the endpoint URL of your WordPress instance's XML-RPC
server, which can be hosted on C<wordpress.com> or on other server, including
your own. It has nothing to do with HTTP/HTTPS proxy; the term "proxy" is used
by the L<XMLRPC::Lite> and L<SOAP::Lite> Perl libraries and C<org2wp> simply
uses the same terminology.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlrdf/Command/Query.pm view on Meta::CPAN
}
use App::perlrdf -command;
use namespace::clean;
use constant abstract => q (query stores, files or remote endpoints with SPARQL);
use constant command_names => qw( query sparql q );
use constant description => <<'DESCRIPTION';
Use SPARQL to query:
* an RDF::Trine::Store;
* a remote SPARQL Protocol (1.0/1.1) endpoint; or
* one or more input files;
But not a combination of the above.
DESCRIPTION
lib/App/perlrdf/Command/Query.pm view on Meta::CPAN
[ 'input-format|p=s', 'Input format (mnemonic: parse)' ],
[ 'input-base|b=s', 'Input base URI' ],
[ 'graph|g=s', 'Graph URI for input' ],
[ 'autograph|G', 'Generate graph URI based on input URI' ],
[]=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>,
[ 'endpoint=s', 'Remote SPARQL Protocol endpoint' ],
[ 'query_method=s', 'Query method (GET/POST/etc)' ],
[]=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>,
[ 'execute|e=s', 'Query to execute' ],
[ 'sparql-file|f=s', 'File containing query to execute' ],
[]=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
lib/App/perlrdf/Command/Query.pm view on Meta::CPAN
{
my ($self, $opt, $arg) = @_;
my %exclusions = (
execute => ['sparql_file'],
endpoint => [
qw[ store dbi sqlite username password host port dbname database ],
qw[ input input_spec input_format input_base ],
],
query_method => [
qw[ store dbi sqlite username password host port dbname database ],
qw[ input input_spec input_format input_base ],
],
map { ; $_ => [
qw[ store dbi sqlite username password host port dbname database ],
qw[ endpoint ],
] } qw( input input_spec input_format input_base )
);
foreach my $k (keys %exclusions)
{
lib/App/perlrdf/Command/Query.pm view on Meta::CPAN
require RDF::Trine;
my ($self, $opt, $arg) = @_;
my $sparql = $self->_sparql($opt, $arg);
if (exists $opt->{endpoint})
{
return $self->_process_sparql($opt, $arg, $sparql, $opt->{endpoint});
}
my $model = $self->_model($opt, $arg);
$self->_process_sparql($opt, $arg, $sparql, $model);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inverted.
To include a literal 'C<^>', place it anywhere else but first. To
include a literal 'C<]>' place it first or immediately after an
initial B<^>. To include a literal 'C<->' make it the first (or
second after B<^>) or last character, or the second endpoint of
a range.
The special bracket expression constructs C<[[:E<lt>:]]> and C<[[:E<gt>:]]>
match the null string at the beginning and end of a word respectively.
(Note that neither is identical to Perl's '\b' atom.)
view all matches for this distribution
view release on metacpan or search on metacpan
## Features
- Simple CLI interface (`sdseasydyn update`)
- Clear configuration precedence: CLI > environment > config file > defaults
- Secure handling of credentials (tokens are never logged)
- Public IPv4 discovery with configurable endpoint
- Local state file to avoid redundant updates
- Bounded retry logic using `Retry::Policy`
- Suitable for unattended / scheduled execution
---
This project is an independent, community-maintained tool and is not
affiliated with, endorsed by, or officially supported by EasyDNS
Technologies.
It uses the publicly documented EasyDNS Dynamic DNS update endpoint and
is provided as-is under the terms of its open-source license.
---
## Documentation
view all matches for this distribution
view release on metacpan or search on metacpan
script/skos2jskos view on Meta::CPAN
use RDF::Query::Client;
my $source = $opt{sparql} || RDF::Trine::Model->new;
if ( $opt{sparql} ) {
info "Getting RDF from SPARQL endpoint " . $opt{sparql};
}
elsif ( $ARGV[0] =~ qr{^https?://} ) {
info "Reading RDF from $ARGV[0]";
RDF::Trine->default_useragent->ssl_opts( verify_hostname => 0 );
RDF::Trine::Parser->parse_url_into_model( $ARGV[0], $source );
script/skos2jskos view on Meta::CPAN
skos2jskos OPTIONS [ FILES | URL ]
=head1 USAGE
This script can be used to convert SKOS data from local RDF files, URL, or
SPARQL-endpoint to L<JSKOS format|https://gbv.github.io/jskos/> (SKOS in
JSON-LD). The script is aligned with JSKOS 0.4.4 but it does not cover all
possible fields yet.
On success the following files are created in normalized JSON:
script/skos2jskos view on Meta::CPAN
Concept scheme URI
=item --sparql | -q
SPARQL endpoint
=item --help | -h | -?
Show usage description
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/soapcli.pm view on Meta::CPAN
my $argv = delete $args{argv};
local @ARGV = $argv ? @$argv : @ARGV;
my ($opts, $usage) = Getopt::Long::Descriptive::describe_options(
"$0 %o data.yml [http://schema | schema.url] [endpoint#port] [operation]",
[ 'verbose|v', 'verbose mode with messages trace', ],
[ 'dump-xml-request|x', 'dump request as XML document', ],
[ 'explain|e', 'explain webservice as Perl code', ],
[ 'help|h', 'print usage message and exit', ],
[ 'json|j', 'output result as JSON document', ],
lib/App/soapcli.pm view on Meta::CPAN
slurp($wsdlsrc);
};
} or die "Can not read WSDL data from `$wsdlsrc': $!\n";
my $arg_endpoint = $self->{extra_argv}->[2];
my $request = do {
if ($arg_request =~ /^{/) {
$arg_request =~ s/\n//g;
lib/App/soapcli.pm view on Meta::CPAN
$value =~ m/^[0-9a-fA-F]+$/ or error __x"{path} contains illegal characters", path => $path;
return pack 'H*', $value;
});
my $port = do {
if (defined $arg_endpoint and $arg_endpoint =~ /#(.*)$/) {
$1;
}
else {
undef;
}
};
my $endpoint = do {
if (defined $arg_endpoint and $arg_endpoint !~ /^#/) {
my $url = $arg_endpoint =~ m{://} ? $arg_endpoint : slurp($arg_endpoint, {chomp=>1});
chomp $url;
$url =~ s/^(.*)#(.*)$/$1/;
$url;
}
else {
lib/App/soapcli.pm view on Meta::CPAN
}
};
my $http = XML::Compile::Transport::SOAPHTTP->new(
address => $endpoint,
);
$http->userAgent->agent("soapcli/$VERSION");
$http->userAgent->env_proxy;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/txtnix/Registry.pm view on Meta::CPAN
my ( $self, $url, $nickname ) = @_;
croak('Parameter url or nickname missing')
if !$url && !$nickname;
my $endpoint = Mojo::URL->new( $self->url )->path('/api/plain/users')
->query( nickname => $nickname, url => $url );
my $tx = $self->ua->post($endpoint);
return 1 if $tx->success;
warn "Can't add user: " . $tx->error->{message} . "\n";
return 0;
lib/App/txtnix/Registry.pm view on Meta::CPAN
sub get_users {
my ( $self, $user, $cb ) = @_;
my $query = Mojo::URL->new( $self->url )->path('/api/plain/users')
->query( q => $user || '' );
return $self->query_endpoint( $query, $cb );
}
sub get_tweets {
my ( $self, $text, $cb ) = @_;
my $query = Mojo::URL->new( $self->url )->path('/api/plain/tweets')
->query( q => $text || '' );
return $self->query_endpoint( $query, $cb );
}
sub get_tags {
my ( $self, $tag, $cb ) = @_;
croak('Parameter tag must be provided for get_tag.')
if not $tag;
my $query = Mojo::URL->new( $self->url )->path("/api/plain/tags/$tag");
return $self->query_endpoint( $query, $cb );
}
sub get_mentions {
my ( $self, $url, $cb ) = @_;
croak('Parameter url must be provided for get_mentions.')
if not $url;
my $query = Mojo::URL->new( $self->url )->path('/api/plain/mentions')
->query( url => $url );
return $self->query_endpoint( $query, $cb );
}
sub process_result {
my ( $self, $tx ) = @_;
my @result;
lib/App/txtnix/Registry.pm view on Meta::CPAN
}
}
return @result;
}
sub query_endpoint {
my ( $self, $endpoint, $cb ) = @_;
if ($cb) {
return $self->ua->get(
$endpoint => sub {
my ( $ua, $tx ) = @_;
my @result = $self->process_result($tx);
$cb->(@result);
}
);
}
return $self->process_result( $self->ua->get($endpoint) );
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
eval "require $module; require App::wdq"; ## no critic
$module->new->parse_from_file( $INC{'App/wdq.pm'} // $0 );
exit;
}
# default SPARQL endpoint
$OPT{api} //= 'https://query.wikidata.org/bigdata/namespace/wdq/sparql';
# add default prefixes by default
$OPT{'default-prefixes'} //= 1;
By default output is colored if writing to a terminal. Disable this with
C<--no-color>, C<--monochrome>, or C<-M>. Force color with C<--color> or C<-C>.
=item --api URL
SPARQL endpoint. Default value:
C<https://query.wikidata.org/bigdata/namespace/wdq/sparql>
=item --no-mediawiki|-m
Don't query MediaWiki API to map URLs to Wikidata items.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/wsgetmail.pm view on Meta::CPAN
=back
=head3 Configuring Microsoft Government Cloud
If you are connecting to a Microsoft Government Cloud tenant (GCC High or
DoD), the default Microsoft Graph API and OAuth endpoints will not work. Use
the following options to point wsgetmail at the correct endpoints.
=over 4
=item resource_url
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Appium.pm view on Meta::CPAN
=head1 DESCRIPTION
Appium is an open source test automation framework for use with native
and hybrid mobile apps. It drives iOS and Android apps using the
WebDriver JSON wire protocol. This module is a thin extension of
L<Selenium::Remote::Driver> that adds Appium specific API endpoints
and Appium-specific constructor defaults. It's woefully incomplete at
the moment, so feel free to pitch in at the L<Github
repo|https://github.com/appium/perl-client>! For details on how Appium
extends the Webdriver spec, see the Selenium project's L<spec-draft
document|https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apple/AppStoreConnect.pm view on Meta::CPAN
If the request is not successful, it will C<die> throwing the C<< HTTP::Response->status_line >>.
=over 4
=item * C<url> : A URL to an API endpoint. Can pass the full URL, e.g. C<url =E<gt> 'https://api.appstoreconnect.apple.com/v1/apps'>,
or you can omit the part up to I<v1/> (i.e. C<url =E<gt> 'apps'>).
=item * C<params> : Any other query params that you need to pass
(see L<API documentation|https://developer.apple.com/documentation/appstoreconnectapi>).
view all matches for this distribution
view release on metacpan or search on metacpan
share/root/socket.io-0.9.16.js view on Meta::CPAN
*/
parser.encodePacket = function (packet) {
var type = indexOf(packets, packet.type)
, id = packet.id || ''
, endpoint = packet.endpoint || ''
, ack = packet.ack
, data = null;
switch (packet.type) {
case 'error':
share/root/socket.io-0.9.16.js view on Meta::CPAN
// construct packet with required fragments
var encoded = [
type
, id + (ack == 'data' ? '+' : '')
, endpoint
];
// data fragment is optional
if (data !== null && data !== undefined)
encoded.push(data);
share/root/socket.io-0.9.16.js view on Meta::CPAN
var id = pieces[2] || ''
, data = pieces[5] || ''
, packet = {
type: packets[pieces[1]]
, endpoint: pieces[4] || ''
};
// whether we need to acknowledge the packet
if (id) {
packet.id = id;
share/root/socket.io-0.9.16.js view on Meta::CPAN
if (packet.type == 'heartbeat') {
return this.onHeartbeat();
}
if (packet.type == 'connect' && packet.endpoint == '') {
this.onConnect();
}
if (packet.type == 'error' && packet.advice == 'reconnect') {
this.isOpen = false;
share/root/socket.io-0.9.16.js view on Meta::CPAN
*
* @param text
*/
Socket.prototype.onPacket = function (packet) {
this.of(packet.endpoint).onPacket(packet);
};
/**
* Handles an error.
*
share/root/socket.io-0.9.16.js view on Meta::CPAN
*
* @api private
*/
SocketNamespace.prototype.packet = function (packet) {
packet.endpoint = this.name;
this.socket.packet(packet);
this.flags = {};
return this;
};
view all matches for this distribution