show amount of pixels painted per ip adress#6
show amount of pixels painted per ip adress#6lkr0n wants to merge 1 commit intoluwae:stats_by_ipfrom
Conversation
Show the amount of pixels drawn by an ip on the canvas. The ip's are drawn in the upper left corner of over the pixelflut canvas. * This commit introduces an additional dependency on SDL2_ttf.h. You might have to install this header through your distros package managaer. * The drawing code was updated to support loading fonts into a glyph atlas. * To make this work this commit extends the existing connection tracker code to keep track of the amount of pixels painted by a connection. This is a very hacky version because I am busy af.
| SDL_Texture * texture; | ||
| } fontTexture; | ||
|
|
||
| enum FontStatus { |
There was a problem hiding this comment.
This pattern does not really fit into the codebase.
(I copied this from an earlier test-version of mine)
| #define TEX_SIZE_Y 512 | ||
| #define SCREEN_SIZE_X 1024 | ||
| #define SCREEN_SIZE_Y 1024 | ||
| #define NET_MASK 0xff |
There was a problem hiding this comment.
(context) This is supposed to be the subnetmask of your LAN. It is required for correctly grouping the connections by ip.
|
Currently we don't keep track of connections that have terminated, so if we had a client that drew a lot of pixels and then quit immediately, it would only show for a split second. Then later if another client is started from the same ip, the old information is lost and it starts again at 0. I think before we can reasonably use this we need to write out the connection trackers of closing connections to a buffer somewhere (or to a file). This is why I dumped these trackers to the command line so far. (Of course, this new approach is nicer because of the immediate feedback, which we don't have on the command line) |
Show the amount of pixels drawn by an ip on the canvas. The ip's are drawn in the upper left corner of over the pixelflut canvas.
This is a very hacky version because I am busy af.