MadelineProto/docs/TD_docs/methods/setNetworkType.md
Daniil Gentili 43adf77378 docufix
2017-12-21 20:08:25 +00:00

1.2 KiB

title description
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

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

Params:

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

Return type: Ok