}
}
+ for(map<unsigned, Port *>::iterator i=ports.begin(); i!=ports.end();)
+ {
+ i->second->tick(dt);
+
+ if(!i->second->is_registered() && i->second->get_activity()<0.1)
+ {
+ delete i->second;
+ ports.erase(i++);
+ }
+ else
+ ++i;
+ }
+
for(list<Packet *>::iterator i=packets.begin(); i!=packets.end();)
{
(*i)->tick(dt);
GL::pop_matrix();
GL::push_matrix();
- GL::translate(-500, -360, 0);
+ GL::translate(-500, -348, 0);
GL::scale_uniform(10);
font->draw_string(format("%d hosts", hosts.size()+disabled_hosts.size()));
GL::translate(0, -1.2, 0);
+ font->draw_string(format("%d ports", ports.size()));
+ GL::translate(0, -1.2, 0);
font->draw_string(format("%.2f fps", fps));
GL::Texture::unbind();
GL::pop_matrix();