insert inline function

added inline function within the server lib to allow the user to
customise the behaviour of the lib