ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-Knuddels/Net/Knuddels.pm
(Generate patch)

Comparing Net-Knuddels/Net/Knuddels.pm (file contents):
Revision 1.10 by root, Thu Jan 13 00:51:18 2005 UTC vs.
Revision 1.11 by root, Thu Jan 13 00:55:00 2005 UTC

188 my $ev = $self->{cb}{$_}; 188 my $ev = $self->{cb}{$_};
189 $_->($type, @arg) for values %$ev; 189 $_->($type, @arg) for values %$ev;
190 } 190 }
191} 191}
192 192
193=item $msg = $protocol->encode_msg (@strings)
194
195Join the strings with C<\0>, encode the result into a protocol packet and
196return it.
197
198=cut
199
200sub encode_msg($@) {
201 my ($self, @args) = @_;
202 my $msg = Net::Knuddels::encode join "\0", @args;
203}
204
193=item $protocol->register ($type => $callback) 205=item $protocol->register ($type => $callback)
194 206
195Register a callback for events of type C<$type>, which is either the name 207Register a callback for events of type C<$type>, which is either the name
196of a low-level event sent by the server (such as "k" for dialog box) or 208of a low-level event sent by the server (such as "k" for dialog box) or
197the name of a generated event, such as C<login_info>. 209the name of a generated event, such as C<login_info>.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines