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

  • POST

Parameters

Parameter NameRequiredTypeDescription
typeYesintInterface number
protocolYesintProtocol type
hostYesstringIP address
portYesstringPort number

Request Example

 {
  "type": 1001,
  "protocol": 1,
  "host": "127.0.0.1",
  "port": 18000
 }

Return Parameter Description

Parameter NameParameter TypeDescription
error_codeintError code
descriptionstringError Description
datajsonBusiness data

Remark