adding documentation about onSocket