Code example for Selector

Methods: close, sleep, wakeup