Created the event handler thread. Started to implement select calls