Introduced a value to check if a heartbeat message is still valid. This prevents from replay attacks (when they are being performed with intercepted messages older than two seconds).
Changed the handshake handler to a class of MessageHandler in order to hide what type a message has (now, there is the encrypted message type field).
Added a heartbeat handler to - surprise - handle heartbeats.
Changed this page massively in order to let it delegate all different messages to MessageHandler implementations.