… | |
… | |
97 | } |
97 | } |
98 | |
98 | |
99 | our $UNIQ = gen_uniq; # per-process/node unique cookie |
99 | our $UNIQ = gen_uniq; # per-process/node unique cookie |
100 | our $ID = "a"; |
100 | our $ID = "a"; |
101 | our $PUBLIC = 0; |
101 | our $PUBLIC = 0; |
102 | our $NODE = $$; |
102 | our $NODE = unpack "H*", nonce 16; |
103 | |
103 | |
104 | our %NODE; # node id to transport mapping, or "undef", for local node |
104 | our %NODE; # node id to transport mapping, or "undef", for local node |
105 | our (%PORT, %PORT_DATA); # local ports |
105 | our (%PORT, %PORT_DATA); # local ports |
106 | |
106 | |
107 | our %RMON; # local ports monitored by remote nodes ($RMON{noderef}{portid} == cb) |
107 | our %RMON; # local ports monitored by remote nodes ($RMON{noderef}{portid} == cb) |
… | |
… | |
240 | devnull => sub { |
240 | devnull => sub { |
241 | # |
241 | # |
242 | }, |
242 | }, |
243 | ); |
243 | ); |
244 | |
244 | |
245 | $NODE{""} = new AnyEvent::MP::Node::Self noderef => $NODE; |
245 | $NODE{""} = $NODE{$NODE} = new AnyEvent::MP::Node::Self noderef => $NODE; |
246 | $PORT{""} = sub { &{ $node_req{+shift} or return } }; |
246 | $PORT{""} = sub { &{ $node_req{+shift} or return } }; |
247 | |
247 | |
248 | =back |
248 | =back |
249 | |
249 | |
250 | =head1 SEE ALSO |
250 | =head1 SEE ALSO |