[tcpapiserver] refactoring: use reactor pattern now;