VM_RESULT vm_gsm_gprs_release_bearer();
VM_RESULT vm_gsm_gprs_release_bearer();
This function release the bearer.
static VMINT g_tcp_hd; void connection_manager(VMBOOL connect){ if(connect){ g_tcp_hd = vm_tcp_connect("http://www.mediatek.com", 80, VM_BEARER_DATA_ACCOUNT_TYPE_GPRS_NONE_PROXY_APN, tcp_cb); } else{ vm_gsm_gprs_release_bearer(); } } void tcp_cb(VMINT handle, VMINT event) { VMINT ret = 0; if (VM_TCP_EVENT_CONNECTED == event || VM_TCP_EVENT_CAN_WRITE == event) { ret = vm_gprs_hold_bearer(VM_GSM_GPRS_HANDLE_TYPE_TCP, handle); ret = vm_tcp_write(handle, "GET / HTTP/1.1rnHOST:www.mediate.com:80rnrn", strlen("GET / HTTP/1.1rnHOST:www.mediate.com:80rnrn")); } if (VM_TCP_EVENT_CAN_READ == event) { VMCHAR buf[2048] = {0}; ret = vm_tcp_read(handle, buf, 2048); vm_tcp_close(handle); } }
vmgsm_gprs.h
Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at
support@toolsfactory.com.