Echo32¤
An example of a 32-bit echo server.
Echo32 is the 32-bit server class and Echo64 is the 64-bit client class. These Echo classes do not actually communicate with a 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. (provided that the data type is pickleable.)
Echo32 ¤
Echo32(host, port)
Bases: Server32
Example that shows Python data types are preserved between Echo32 and Echo64.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
host
|
str
|
The IP address (or hostname) to use for the server. |
required |
port
|
int
|
The port to open for the server. |
required |
Source code in src/msl/examples/loadlib/echo32.py
21 22 23 24 25 26 27 28 29 30 31 |
|
received_data
staticmethod
¤
received_data(*args, **kwargs)
Process a request from the Echo64.send_data method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args
|
Any
|
The arguments. |
()
|
kwargs
|
Any
|
The keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
tuple[tuple[Any, ...], dict[str, Any]]
|
The |
Source code in src/msl/examples/loadlib/echo32.py
33 34 35 36 37 38 39 40 41 42 43 44 |
|