Reword comments.
Consolidate socket closing/error reporting.
Standardise comments.
Simplify comment.
Allow clients to provide client info during connection.
Simplify handshake validation.
Document thread context.
Allow servers to veto clients based on client info.