+=item B<PUTNOTIF> [[B<severity>=I<$severity>] [B<message>=I<$message>] [ ...]]
+
+=cut
+
+sub putnotif {
+ my $sock = shift || return;
+ my $line = shift || return;
+
+ my @line = tokenize($line);
+
+ my $ret;
+
+ my (%values) = ();
+ foreach my $i (@line) {
+ my ($key, $val) = split m/=/, $i, 2;
+ if ($key && $val) {
+ $values{$key} = $val;
+ }
+ else {
+ $values{'message'} = defined($values{'message'})
+ ? ($values{'message'} . ' ' . $key)
+ : $key;
+ }
+ }
+ $values{'time'} ||= time();
+
+ $ret = $sock->putnotif(%values);
+ if (! $ret) {
+ print STDERR "socket error: " . $sock->{'error'} . $/;
+ }
+ return $ret;
+}
+