Set network protocol port
1. API Description
This API is used to set the network protocol port.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/app/set-network-port
- V2.5.0 and below: POST [ip]/mwapi/set-network-port
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
control-port | Yes | Int | The TCP control port |
stream-port | Yes | Int | The SRT stream port |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
4. Example
Set the TCP control port to 9000, and set the SRT stream port to 9110.
Input Example
{
"control-port":9000,
"stream-port":9110
}
Output Example
{
"status": 0,
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status | Definition | Description |
---|---|---|
46 | MW_STATUS_ADDR_IN_USE | The port is in use |
49 | MW_STATUS_INVALID_DATA | The parameters are missing or incorrect |