Added socket monitor example using events