MadelineProtoDocs/docs/TD_docs/methods/setNetworkType.md
Daniil Gentili e5a1324684 docufix
2018-04-04 23:19:57 +00:00

1.3 KiB

title description image
setNetworkType Sets current network type. Can be called before authorization. Call to this method forces reopening of all network connections mitigating delay in switching between different networks, so it should be called whenever network is changed even network type remains the same. -Network type is used to check if library can use network at all and for collecting detailed network data usage statistics https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Method: setNetworkType

Back to methods index

YOU CANNOT USE THIS METHOD IN MADELINEPROTO

Sets current network type. Can be called before authorization. Call to this method forces reopening of all network connections mitigating delay in switching between different networks, so it should be called whenever network is changed even network type remains the same. -Network type is used to check if library can use network at all and for collecting detailed network data usage statistics

Parameters:

Name Type Required Description
type NetworkType Yes New network type, defaults to networkTypeNone

Return type: Ok