Implemented threading in server network code