delayed_echo

delayed_echo#

method

SampleService.delayed_echo(message: str, seconds: int) str[source]#

Echoes back as the response the exact message as received with “SERVER RECEIVED: “ prepended to the message after delaying by the specified number of seconds.

This function demonstrates that the connection does not die out even for long running requests.

Parameters:
messagestr

The message to be echoed by the server.

secondsint

The number of seconds the server should wait before responding.

Returns:
respstr

The message to be echoed, prepended with “SERVER RECEIVED: “.