tencent cloud

Tencent Cloud EdgeOne

Release Notes and Announcements
Release Notes
Security Announcement
Announcements
Product Introduction
Overview
Strengths
Use Cases
Comparison Between EdgeOne and CDN Products
Use Limits
Purchase Guide
Description of Trial Plan Experience Benefits
Free Plan Guide
Billing Overview
Billing Items
Subscriptions
Renewals
Instructions for overdue and refunds
Comparison of EdgeOne Plans
About "clean traffic" billing instructions
DDoS Protection Capacity Description
Getting Started
Choose business scenario
Quick access to website security acceleration
Quick deploying a website with Pages
Domain Service&Origin Configuration
Domain Service
HTTPS Certificate
Origin Configuration
Site Acceleration
Overview
Access Control
Smart Acceleration
Cache Configuration
File Optimization
Network Optimization
URL Rewrite
Modifying Header
Modify the response content
Rule Engine
Image&Video Processing
Speed limit for single connection download
DDoS & Web Protection
Overview
DDoS Protection
Web Protection
Bot Management
API Discovery(Beta)
Edge Functions
Overview
Getting Started
Operation Guide
Runtime APIs
Sample Functions
Best Practices
Pages
L4 Proxy
Overview
Creating an L4 Proxy Instance
Modifying an L4 Proxy Instance
Disabling or Deleting an L4 Proxy Instance
Batch Configuring Forwarding Rules
Obtaining Real Client IPs
Data Analysis&Log Service
Log Service
Data Analysis
Alarm Service
Site and Billing Management
Billing Management
Site Management
Version Management
General Policy
General Reference
Configuration Syntax
Request and Response Actions
Country/region and Corresponding Codes
Terraform
Overview
Installing and Configuring Terraform
Practical Tutorial
Automatic Warm-up/Cache Purge
Resource Abuse/hotlinking Protection Practical
HTTPS Related Practices
Acceleration Optimization
Scheduling Traffic
Data Analysis and Alerting
Log Platform Integration Practices
Configuring Origin Servers for Cloud Object Storage (Such As COS)
CORS Response Configuration
API Documentation
History
Introduction
API Category
Making API Requests
Site APIs
Acceleration Domain Management APIs
Site Acceleration Configuration APIs
Edge Function APIs
Alias Domain APIs
Security Configuration APIs
Layer 4 Application Proxy APIs
Content Management APIs
Data Analysis APIs
Log Service APIs
Billing APIs
Certificate APIs
Origin Protection APIs
Load Balancing APIs
Diagnostic Tool APIs
Custom Response Page APIs
API Security APIs
DNS Record APIs
Content Identifier APIs
Legacy APIs
Ownership APIs
Image and Video Processing APIs
Multi-Channel Security Gateway APIs
Version Management APIs
Data Types
Error Codes
FAQs
Product Features FAQs
DNS Record FAQs
Domain Configuration FAQs
Site Acceleration FAQs
Data and Log FAQs
Security Protection-related Queries
Origin Configuration FAQs
Troubleshooting
Reference for Abnormal Status Codes
Troubleshooting Guide for EdgeOne 4XX/5XX Status Codes
520/524 Status Code Troubleshooting Guide
521/522 Status Code Troubleshooting Guide
Tool Guide
Agreements
Service Level Agreement
Origin Protection Enablement Conditions of Use
TEO Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Android

PDF
Focus Mode
Font Size
Last updated: 2025-03-24 17:18:58

API Overview

API
Description
The main function of QUIC, used to create QuicCall instances and QUIC configuration and get the version number etc.
QuicCall
Manage QUIC requests.
Encapsulate requests.
Encapsulate responses.
Execute callbacks.
Get information about QUIC network status.

QuicClient

The main function of QUIC, used to create QuicCall instances and QUIC configuration and get the version number etc.
API
Description
newCall
Create a QuicCall instance.
Builder
Construct QUIC configuration .
Get the SDK version number.

newCall

Create a QuicCall instance for each QUIC request.
QuicCall newCall(QuicRequest request)
Parameter
Description
request
The request to be encapsulated. See QuicRequest.

getVersion

A static method that can get the SDK version number.
String getVersion()

Builder

QUIC configuration APIs
API
Description
Set the QUIC version.
Set the congestion control algorithm.
Set the connection timeout.
Set the total timeout for the request.
Set the idle connection timeout.
Whether to support IPv6.
build
Create QuicClient.

setQuicVersion

Set the QUIC version.
Builder setQuicVersion(int quicVersion)
Parameter
Description
quicVersion
Set the QUIC version. Supported versions: Q043, Q046, Q050, Q051, draft-29, RFC-V1 (RFC 9000).
Values:
QuicClient.QUIC_VERSION_Q43 (default)
QuicClient.QUIC_VERSION_Q46 audio/video proxy
QuicClient.QUIC_VERSION_Q50 audio/video proxy
QuicClient.QUIC_VERSION_Q51 audio/video proxy
QuicClient.QUIC_VERSION_IETF_DRAFT_29 audio/video proxy
QuicClient.QUIC_VERSION_IETF_RFC_V1 audio/video proxy

setCongestionType

Set the congestion control algorithm.
Builder setCongestionType(int congestionType)
Parameter
Description
congestionType
Supported congestion control algorithms: CubicBytes, RenoBytes, BBR, PCC, GCC.
Values:
QuicClient.CONGESTION_TYPE_BBR (default)
QuicClient.CONGESTION_TYPE_RENO_BYTES
QuicClient.CONGESTION_TYPE_BBR
QuicClient.CONGESTION_TYPE_PCC
QuicClient.CONGESTION_TYPE_GCC

setConnectTimeoutMillis

Set the connection timeout.
Builder setConnectTimeoutMillis(int connectTimeoutMillis)
Parameter
Description
connectTimeoutMillis
Set the connection timeout in milliseconds.
Default value: 60000.

setTotalTimeoutMillis

Set the total timeout that covers data read and write.
Builder setTotalTimeoutMillis(int totalTimeoutMillis)
Parameter
Description
totalTimeoutMillis
Set the total timeout in milliseconds.
Default value: 0 (no timeout).

setIdleTimeoutMillis

Set the idle connection timeout. When the timeout expires, connections are closed and cannot be reused.
Builder setIdleTimeoutMillis(int idleTimeoutMillis)
Parameter
Description
idleTimeoutMillis
The idle connection timeout in milliseconds.
Default value: 90000.

setSupportIpV6

Whether to support IPv6.
Builder setSupportIpV6(boolean supportIpV6)
Parameter
Description
supportIpV6 audio/video proxy
Whether to support IPv6. Values: true, false.
Default value: false.

build

Create QuicClient.
QuicClient build()

QuicCall

Manage QUIC requests.
API
Description
enqueue
Initiate an asynchronous QUIC network request.
cancel
Cancel requests.
Get information about QUIC network status. For more details, see QuicNetStats.

enqueue

Add an asynchronous QUIC request to the queue. You can get response from the callback function.
void enqueue(QuicCallback callback)
Parameter
Description
callback
Return response from the callback function. For more details, see QuicCallback.

cancel

Cancel requests.
void cancel()

getQuicNetStats

Get information about QUIC network status.
QuicNetStats getQuicNetStats()

QuicRequest

Request parameter
API
Description
Builder
Construct a request parameter.

Builder

API
Description
setUrl
Set the request URL.
setIp
Set the request IP.
addHeader
Add the request header
get
Set the request type to GET.
post
Set the request type to POST.
method
Set other request parameters.
build
Create a QuicRequest object.

setUrl

Set the request URL.
Builder setUrl(String url)
Parameter
Description
url
(Required) The request URL.

setIp

Set the request IP address.
Builder setIp(String ip)
Parameter
Description
ip
(Optional) If you do not use DNS resolution, set the IP address that the hostname resolves to.

addHeader

Add the request header in a key-value format.
Builder addHeader(String key, String value)
Parameter
Description
key
Key of the header.
value
Value of the header.

get

Set the request type to GET.
Builder get()

post

Set the request type to POST.
Builder post(RequestBody body)
Parameter
Description
body
Body data.

method

Construct DELETE, PUT and other requests.
Builder method(String method, RequestBody body)
Parameter
Description
method
Supported request methods: PUT, DELETE, HEAD, PATCH.
body
Body data.

build

Create QuicRequest
QuicRequest build()

QuicResponse

Response information
API
Description
getCode
Get the response status code.
Get the response headers.
Get Content-Type.
Get Content-Length.
body
Get the response body.

getCode

Get the response status code.
int getCode()

getHeaders

Get a list of response headers.
List<String> getHeaders()

getContentType

Get the content type from the response.
void getContentType(String contentType)
Parameter
Description
contentType
Get the content type.

getContentLength

Get the content length.
void getContentLength(long contentLength)
Parameter
Description
contentLength
Get the content length.

body

Get the body of the response.
ResponseBody body()

QuicCallback

Execute callbacks.
API
Description
The callback succeeded.
onFailed
The callback failed.

onResponse

The callback function to execute when the request has succeeded.
void onResponse(QuicCall call, QuicResponse response) throws IOException
Parameter
Description
call
Manage the QUIC request. For more details, see QuicCall.
response
Return the QUIC response. For more details, see QuicResponse.

onFailed

The callback function to execute when the request has failed.
void onFailed(QuicCall call, int errorCode, String errorMsg)
Parameter
Description
call
Manage the QUIC request. For more details, see QuicCall.
errorCode
The error code.
errorMsg
The error message.

QuicNetStats

Get information about QUIC network status.
API
Description
isValid
Whether the value of status is valid.
isQuic
Whether it is a QUIC request.
is0rtt
Whether it is a 0-RTT connection.
isConnReuse
Whether the connection is reused.
getConnectMs
Get the connection duration in milliseconds.
getDnsMs
Get the DNS duration in milliseconds.
getDnsCode
Get the DNS error code.
getTtfbMs
Get the time taken for the first byte to be received in milliseconds.
getCompleteMs
Get the time taken for the request to be completed in milliseconds. The time taken by the connection is not included.
getSrttMs
Get the average round-trip time in milliseconds.
getPacketsSent
Get the number of packets sent in bytes.
getPacketsRetransmitted
Get the number of packets retransmitted in bytes.
getBytesSent
Get the number of bytes sent.
getBytesRetransmitted
Get the number of bytes retransmitted.
getPacketsLost
Get the number of packets lost in bytes.
getPacketsReceived
Get the number of packets received in bytes.
getBytesReceived
Get the number of bytes received.
getStreamBytesReceived
Get the number of bytes received within the stream.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback