I'm writing a network application, and have been running into a slight nuisance. I have to wait a period in-between tests, because my server program, even after closing still has the port I'm using "allocated" to it. Furthermore, this makes debugging really hard, since I can't tell what's causing whatever problem I'm dealing with.
For testing purposes, is there a way to free up TCP and UDP ports?