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)[source]
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.Note
Any class that is a subclass of
Server32
MUST provide two arguments in its constructor: host and port (in that order) and **kwargs. Otherwise theserver32
executable, seestart_server32
, cannot create an instance of theServer32
subclass.- received_data(*args, **kwargs)[source]
Process a request from the
send_data()
method from the 64-bit client.- Parameters:
*args – The arguments.
**kwargs – The keyword arguments.
- Returns:
tuple
– The args and kwargs that were received.