Sample Video Frame

Created by Zed A. Shaw Updated 2024-02-17 04:54:36

Exercise 47: A Fast URL Router

I'm now going to show you how I use the TSTree to do fast URL routing in Web servers that I've written. This works for simple URL routing you might use at the edge of an application, but doesn't really work for the more complex (and sometimes unnecessary) routing found in many Web application frameworks.

To play with routing, I'm going to make a little command line tool that I'm calling urlor, which reads a simple file of routes, and then prompts the user to enter in URLs.

Previous Lesson Next Lesson

Register for Learn C the Hard Way

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.