what is Android VpnService.Builder setBlocking

itarill

My question is: what does it really do? For instance, if I set it to true, what does it do to packages (datagrams?) that I want to write to the TUN device? As far as I noticed it does not mean that all packets to be written to the TUN device will be discarded rather than processed in another manner. Does it mean this?

So I can only track what it does only this far:

public Builder setBlocking(boolean blocking) {
    mConfig.blocking = blocking;
    return this;
}

And that

public class Builder {
    private final VpnConfig mConfig = new VpnConfig();
    //other stuff here ...
}

I also read the official description, but it is still unclear to me. Googling it will only lead to search results related to "how to bypass VPN blocking".

ecdsa

It does refer to blocking I/O and has nothing to do with blocking traffic or how packets are treated. Instead it changes how your program interacts with the file descriptor.

In blocking mode, operations like read()/write() will block until some data has been transferred (or an error occurred) whereas in non-blocking mode the operations may return immediately (with EAGAIN or EWOULDBLOCK) if the file descriptor is currently not ready and the operation would block.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Android: VPN service setBlocking Mode

Android VpnService - How to check VpnService if it was started?

Android Management API and VpnService

Android firewall with VpnService

Android VpnService 'protect' method not working

Android VpnService with multiple addresses and routes?

VpnService.Builder IPv6 error null object

Xamarin Android - VpnService is blocking all apps

Issue about Android understanding VpnService code

Android: What is transport and jsonFactory in GoogleIdTokenVerifier.Builder?

Android VpnService protect socket that's stored in native code?

A firewall for Android with VpnService. Responses are delivered, but a SocketTimeoutException is thrown

Android VpnService start on Device ACTION_BOOT_COMPLETED not working

Android VpnService to capture packets won't capture packets

What is Applicative Builder

What are the different builder widgets(Future Builder, Stream Builder, Layout builder, Listview Builder) in Flutter.?

android service, context, builder

Dynamic Form Builder In Android

Notifications Builder in android 2.3

Eclipse - Errors running builder 'Android Package Builder'

What is the use of sql builder in PetaPoco?

What's the revised builder pattern?

interface builder what is Object template

What are Builder, Combiner, and Splitter in scala?

Builder Pattern: What is the purpose of the Director?

what are key command in interface Builder

What is the best HTML newsletter builder?

what "--from=builder" do in Dockerfile

AttributeError: module 'socket' has no attribute 'setblocking'