msl.examples.loadlib.echo32 module
An example of a 32-bit echo server.
Example of a server that is executed by a 32-bit Python interpreter that receives
requests from the corresponding echo64
module which can be run by a 64-bit
Python interpreter.
Echo32
is the 32-bit server class and Echo64
is
the 64-bit client class. These echo classes do not actually communicate with a shared
library. The point of these echo classes is to show that a Python data type in a
64-bit process appears as the same data type in the 32-bit process and vice versa.
-
class msl.examples.loadlib.echo32.Echo32(host, port, **kwargs)
Bases: Server32
Example of a server class that illustrates that Python data types are preserved
when they are sent from the Echo64
client to the server.
- Parameters:
host (str) – The IP address (or hostname) to use for the server.
port (int) – The port to open for the server.
kwargs (str) – Optional keyword arguments. The keys and values are of type str
.
-
static received_data(*args, **kwargs)
Process a request from the send_data()
method from
the 64-bit client.
- Parameters:
-
- Returns:
The args and kwargs that were received.
- Return type:
tuple[tuple[Any, …], dict[Any, Any]]