Add necessary protocl function for server side
With bugs