Socket multiplexing

Make socket IO deterministic.