Separate server tasks from socket interface