shutdown

fun shutdown()

Stop everything and release the sockets.