Added socket state

Issue #176 on hold
Kaya Kupferschmidt
created an issue

Sockets should have a state variable (enum)