The StreamingSocket class could use some assertions that ensure the provided port numbers are lower than 65535. It may not be obvious to everyone that a port number is limited to 16 bit integer range.
Yep, that's an easy addition!
Nice catch! This is fixed on the latest tip.