Find file
Fetching contributors…
Cannot retrieve contributors at this time
166 lines (91 sloc) 4.6 KB


Log::UDP::Server - A simple way to receive and handle structured messages via UDP


version 0.40.0


use Log::UDP::Server;

my $server = Log::UDP::Server->new( handler => sub { warn( $_[0] ); } );


This module enables you to receive a message (simple string or complicated object) over a UDP socket. An easy way to send a structured message is to use Log::UDP::Client. The message received will automatically be handled by the specified callback.


handler : CodeRef

The handler that is used to process each message as it is received.

server_address : Str

The address you want to listen on.

server_port : Int

The port you want to listen on.

server_socket : IO::Socket::INET

The listening socket used for communication.



Starts the server and listens for incoming datagrams on the specified socket.


Initializes the get_datagram event on server_socket.



Will execute the coderef in handler with the deserialized message as the first argument.



Maximum UDP packet size. Set to 8192 bytes.


  • deserialize
  • deserializer
  • serialize
  • serializer
  • serializer_module
  • throws_exception

All of these methods are inherited from Data::Serializable. Read more about them there.



You can find documentation for this module with the perldoc command.

perldoc Log::UDP::Server


The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

  • Search CPAN

The default CPAN search engine, useful to view POD in HTML format.

  • RT: CPAN's Bug Tracker

The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.

  • AnnoCPAN

The AnnoCPAN is a website that allows community annonations of Perl module documentation.

  • CPAN Ratings

The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.

  • CPAN Forum

The CPAN Forum is a web forum for discussing Perl modules.


The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.

  • CPAN Testers

The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.

  • CPAN Testers Matrix

The CPAN Testers Matrix is a website that provides a visual way to determine what Perls/platforms PASSed for a distribution.

  • CPAN Testers Dependencies

The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-log-udp-server at, or through the web interface at You will be automatically notified of any progress on the request by the system.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

git clone git://


Robin Smidsrød


This software is copyright (c) 2011 by Robin Smidsrød.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.