Added Listen thread.

ISSUES: Incorrect opening of sockets.