Cross-End Data Communication
Warning
Server-side API Documentation: ServerRemoteChannel
Client-side API Documentation: ClientRemoteChannel
Improvement Details
Tip
Reason for Modification: In the original d.ts file provided by the officials, the communication interface for this API was uniformly declared as the any
type.
However, in most cases, to ensure the consistency of the current communication message format, we have adopted generics for constraints, thereby improving code readability and checking accuracy.
Usage Guide
Basic Usage
Client Sending Data to Server
Server Receiving Data
Without Type Constraints
With Type Constraints
Best Practices
- It is recommended to always use type constraints during development.
- Ensure that the client and server use the same type definitions.
- Regularly check the API documentation for the latest updates.