Returns a newly-initialised object of the given class. This is much like the regular new methods of other modules in this distribution, except that it does a bind rather than a connect, and it does a listen. Unless specified otherwise with a type object parameter, the underlying socket will be a datagram socket (SOCK_DGRAM).
The examples above show the indirect object syntax which many prefer, as well as the guaranteed-to-be-safe static method call. There are occasional problems with the indirect object syntax, which tend to be rather obscure when encountered. See http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1998-01/msg01674.html for details.
See Net::TCP::Server for an example of running a server. The differences are only in the module names and the fact that UNIX-domain sockets bind to a pathname rather than to a port number. Of course, that example is for stream (type = SOCK_STREAM) sockets rather than for datagrams. UNIX-domain datagram sockets dont need to do an accept() (and cant where Ive tested this code), and cant answer back to their clients unless those clients have also bound to a specific path name.
Verifies that all previous parameter assignments are valid (via checkparams). Returns the incoming object on success, and undef on failure. Usually called only via a derived classs init method or its own new call.
[See the description in Protected Methods in Net::Gen for my definition of protected methods in Perl.]
There are no socket options known to the Net::UNIX::Server module itself.
There are no object parameters registered by the Net::UNIX::Server module itself.
default None. exportable None. tags The following :tags are available for grouping exportable items:
:ALL All of the above exportable items.
This module has been tested with threaded perls, and should be as thread-safe as perl itself. (As of 5.005_03 and 5.005_57, thats not all that safe just yet.) It also works with interpreter-based threads (ithreads) in more recent perl releases.
Spider Boardman <firstname.lastname@example.org>
|perl v5.20.3||NET::UNIX::SERVER (3)||2016-03-17|