Michael Shipper
and 1 contributors

NAME

URI::ws_Punix - URI for ws+unix

SYNOPSIS

  use URI;
  my $url='ws+unix://unix%2F:%2Ftest%2Fsocket.sock/testing';

  my $uri=new URI($url);

  # will output: ws+unix
  print $uri->scheme,"\n";

  # will output: unix/
  print $uri->host,"\n";

  # will output: /test/socket.sock
  print $uri->port

  # some classes don't yet understand the scheme ws+unix, so here is a work around
  $uri->set_false_scheme('ws');
  print $uri->scheme,"\n"; # now prints "ws"

DESCRIPTION

This class acts as a parser layer for URI, and adds support for handling the rare WebSocket URI using a "Unix Domain Socket. The scheme expected is "ws+unix". Since most modules don't understand this just yet, the fake scheme or $uri->set_false_scheme('ws') was added.

METHODS

URI::ws_Punix->default_port

Returns the default port /tmp/unix.sock

$uri->set_false_scheme('ws')

Used to overload the default behavior.. sometimes you may want to say "ws" in place of "ws+unix". Some modules expect ws, this method lets you overload the default of $uri->scheme.

URI::ws_Punix->scheme

Normally follows the defaults unless $uri->set_false_scheme('value') was called on this instance.

URI::ws_Punix->secure

Returns false

AUTHOR

Michael Shipper <AKALINUX@CPAN.ORG>