Skip to content

Multi-User Web Server Again

March 28, 2014

14-03-27 multi-user

I’m back with the multi-user web server. I made a table of IP addresses and names that’s managed by the server and displayed with a button on the form. My table management is very basic: it starts with a next-slot index pointing to the beginning of the table and puts a new user into that slot, incrementing the variable. If it gets to the end of the table it wraps around re-using the slot. I tried out the logic with only three slots and i was able to drive a wrap-around by using the laptop, a tablet and my phone – the phone could present as two different ips because it has cellular access.

The simplistic table structure means you have to search the whole table to find an entry. I was worried that would be slow but what’s strikingly slow even with just a few entries is displaying the table – each row takes 1/3 second. It turns out the time is being spend in my old friend the itoa() routine which converts integers for printing as ascii strings. I used a simplistic C routine for doing it and never optimized it. I wrote something better in assembly for longs but never did for ints. I’ll have to get on that sometime. In the mean time I’ll just change things not to display IPs as much.


From → web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: