[Change] Server codes to inline functions