File: ServerUNIX.pm

package info (click to toggle)
libtest-unixsock-perl 0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 124 kB
  • sloc: perl: 162; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package t::ServerUNIX;
use strict;
use warnings;
use IO::Socket::UNIX;
use base q/t::Server/;

sub new {
    my ($class, $path) = @_;

    my $sock = IO::Socket::UNIX->new(
        Local  => $path,
        Type   => SOCK_STREAM,
        Listen => 1,
    );
    bless { sock => $sock }, $class;
}

1;