Fix resolving basepath.
Add protocol socket to index if not empty.
Listen to connection event for reliable protocols.
Refactor object inheritance.