@Internal
public final class InternalCronetChannelBuilder
extends java.lang.Object
CronetChannelBuilder accessor. This is intended for usage internal to the gRPC
team. If you *really* think you need to use this, contact the gRPC team first.| Modifier and Type | Method and Description |
|---|---|
static void |
setTrafficStatsTag(CronetChannelBuilder builder,
int tag)
Sets
android.net.TrafficStats tag to use when accounting socket traffic caused by this
channel. |
static void |
setTrafficStatsUid(CronetChannelBuilder builder,
int uid)
Sets specific UID to use when accounting socket traffic caused by this channel.
|
public static void setTrafficStatsTag(CronetChannelBuilder builder, int tag)
android.net.TrafficStats tag to use when accounting socket traffic caused by this
channel. See android.net.TrafficStats for more information. If no tag is set (e.g. this
method isn't called), then Android accounts for the socket traffic caused by this channel as if
the tag value were set to 0.
NOTE:Setting a tag disallows sharing of sockets with channels with other tags, which may adversely effect performance by prohibiting connection sharing. In other words use of multiplexed sockets (e.g. HTTP/2 and QUIC) will only be allowed if all channels have the same socket tag.
public static void setTrafficStatsUid(CronetChannelBuilder builder, int uid)
android.net.TrafficStats for more information. Designed for use when performing an operation
on behalf of another application. Caller must hold android.Manifest.permission#MODIFY_NETWORK_ACCOUNTING permission. By default traffic is
attributed to UID of caller.
NOTE:Setting a UID disallows sharing of sockets with channels with other UIDs, which may adversely effect performance by prohibiting connection sharing. In other words use of multiplexed sockets (e.g. HTTP/2 and QUIC) will only be allowed if all channels have the same UID set.