base structure has been built, but there is a bug at client which results in dead loop.And then i will replace nio with generic socket