move networking operations on different thread

use blocking queues to communicate between UI thread and networking
thread