Last active
December 11, 2015 06:08
-
-
Save slashthinking/4556629 to your computer and use it in GitHub Desktop.
网络协议
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
摘自微信代码 | |
public static String APN_3GNET; | |
public static String APN_3GWAP; | |
public static String APN_777; | |
public static String APN_CMNET; | |
public static String APN_CMWAP; | |
public static String APN_CTNET; | |
public static String APN_CTWAP; | |
public static final String APN_NET = "Net"; | |
public static String APN_UNINET; | |
public static String APN_UNIWAP; | |
public static final String APN_UNKNOWN = "N/A"; | |
public static final String APN_WAP = "Wap"; | |
public static final String APN_WIFI = "Wlan"; | |
public static boolean IS_INIT = false; | |
public static int M_APN_PORT = 0; | |
public static String M_APN_PROXY; | |
public static int M_APN_TYPE = 0; | |
public static byte M_PROXY_TYPE = 0; | |
public static boolean M_USE_PROXY = false; | |
private static final String PROXY_CTWAP = "10.0.0.200"; | |
public static final byte PROXY_TYPE_CM = 0; | |
public static final byte PROXY_TYPE_CT = 1; | |
private static final String TAG = "Apn"; | |
public static final int TYPE_NET = 1; | |
public static final int TYPE_UNKNOWN = 0; | |
public static final int TYPE_WAP = 2; | |
public static final int TYPE_WIFI = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
摘自facebook代码 | |
str = "1xRTT"; | |
continue; | |
str = "CDMA"; | |
continue; | |
str = "EDGE"; | |
continue; | |
str = "EHRPD"; | |
continue; | |
str = "EVDO_0"; | |
continue; | |
str = "EVDO_A"; | |
continue; | |
str = "EVDO_B"; | |
continue; | |
str = "GPRS"; | |
continue; | |
str = "HSDPA"; | |
continue; | |
str = "HSPA"; | |
continue; | |
str = "HSPAP"; | |
continue; | |
str = "HSUPA"; | |
continue; | |
str = "IDEN"; | |
continue; | |
str = "LTE"; | |
continue; | |
str = "UMTS"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qq网络异常定义。 | |
public static final int CONNECTION_TIMEOUT = 30000; | |
public static final int ERR_LOCAL_TIMEOUT = 900005; | |
public static final int ERR_NET_EXCEPTION = 900006; | |
public static final int ERR_NO_NET = 900009; | |
public static final int ERR_PROXCY_DNS_ERR = 900003; | |
public static final int ERR_PROXCY_SERVER_CONN_TIMEOUT = 900001; | |
public static final int ERR_PROXCY_SERVER_READ_TIMEOUT = 900000; | |
public static final int ERR_PROXCY_SERVER_RSP_EMPTY = 900002; | |
public static final int ERR_SNED_DATA_WUP_DECODE = 900008; | |
public static final int ERR_SNED_DATA_WUP_ENCODE = 900007; | |
public static final int ERR_STANDAR_HTTP = 900004; | |
public static final String KEY_APN = "key_apn"; | |
public static final String KEY_NET_RSP_CODE = "rsp_code"; | |
public static final String KEY_NET_RSP_MSG = "rsp_msg"; | |
public static final String MSG_ERR_CONNECT_SERVER = "connect the server timeout"; | |
public static final String MSG_ERR_DNS = "dns can not resovle the domain name"; | |
public static final String MSG_ERR_READ_TIMEOUT = "read server response timeout"; | |
public static final int MSG_FAIL = -100; | |
public static final String MSG_HTTP_RSP_EMPTY = "http response is null"; | |
public static final String MSG_HTTP_STANDAR = "http status line code is "; | |
public static final String MSG_LOCAL_TIMEOUT = "local send data server occur timeout"; | |
public static final String MSG_NO_NET_ERR = "网络无连接"; | |
public static final int MSG_OK = 1; | |
public static final String MSG_OTHER_EXCEPTION = "other network exception"; | |
public static final int MSG_TIMEOUT = -101; | |
public static final int MSG_UNKNOWN = -999; | |
public static final String MSG_WUP_DECODE_ERR = "wup decode error"; | |
public static final String MSG_WUP_ENCDOE_ERR = "wup encode error"; | |
public static final String NET_COST_TIME = "net_cost_time"; | |
public static final String NET_DATE_REQUEST_COUNT = "net_data_request_time"; | |
public static final int NET_TYPE_2G = 2; | |
public static final int NET_TYPE_3G = 3; | |
public static final int NET_TYPE_NO_NETWORK = 0; | |
public static final int NET_TYPE_UNKOWN = -1; | |
public static final int NET_TYPE_USB = 4; | |
public static final int NET_TYPE_WIFI = 1; | |
public static final int NetworkErrorCode_EXCEPTION = 3; | |
public static final int NetworkErrorCode_NO_NET = 4; | |
public static final int NetworkErrorCode_ResponsError = 1; | |
public static final int NetworkErrorCode_ResponsNotOK = 2; | |
public static final int PhotoUploadTimeOut = 60000; | |
public static final int READ_TIMEOUT = 50000; | |
public static final int TCP_BUFF_SIZE = 8192; | |
public static final String TO_SERVER_URL = "ToServiceMsg_URL"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment