message-handler/tcp-handler
Description
- Implement a TCP message handler, requiring you to develop your own TCP server.
- This handler utilizes short connections, automatically disconnecting after sending.
- The first four bytes of the message represent the text length; you can read the four bytes first and then retrieve the
specified length of text.
Request URL
http://127.0.0.1:8888/api/
Request Method
Parameters
Parameter Name | Required | Type | Description |
---|
type | Yes | int | Interface number |
protocol | Yes | int | Protocol type |
host | Yes | string | IP address |
port | Yes | string | Port number |
Request Example
{
"type": 1001,
"protocol": 1,
"host": "127.0.0.1",
"port": 18000
}
Return Parameter Description
Parameter Name | Parameter Type | Description |
---|
error_code | int | Error code |
description | string | Error Description |
data | json | Business data |