update ChangeLog
[lwes-erlang/github-mirror.git] / src / lwes_emitter_udp.erl
blob425f6b627d3b3e539c8ffb973aa025425aaabf7d
1 -module (lwes_emitter_udp).
3 -behaviour (lwes_emitter).
5 -export ([ new/1,
6 id/1,
7 prep/1,
8 emit/2,
9 close/1
10 ]).
12 new (Config) ->
13 lwes_net_udp:new (emitter, Config).
15 id (Config) ->
16 lwes_net_udp:address(Config).
18 prep (Event) ->
19 lwes_event:to_iolist(Event).
21 emit (Config, Event) ->
22 Address = lwes_net_udp:address(Config),
23 lwes_emitter_udp_pool:send (lwes_emitters, Address, Event).
25 close (_Config) ->
26 ok.