ã¾ã AnyEventã®ãããã®ä½¿ãæ¹ã¨ãæåã¨ããææ¡ãããã¦ããªãã ã¡ãã£ã¨ç·´ç¿ã«AnyEvent::Socketã¨AnyEvent::Handleã§è¶ ã·ã³ãã«ãªechoãµã¼ããæ¸ãã¦ã¿ã #!/usr/bin/perl use strict; use warnings; use AnyEvent::Socket; use AnyEvent::Handle; my $cv = AE::cv; tcp_server undef, 1982, sub { my $hdl; $hdl = AnyEvent::Handle->new( fh => shift, on_read => sub { $hdl->push_write(delete $hdl->{rbuf}); }, on_eof => sub {}, ); }; $cv->recv; ãããåããã¦ããã¦ãå¤ããç¹ãã¨echoãµã¼ã
{{#tags}}- {{label}}
{{/tags}}