This function reads data from a TCP connection synchronously and it will blocked until it has finished reading all data.
|
Parameters |
Description |
|
VM_TCP_HANDLE handle |
[IN] The TCP handle. |
|
void* buffer |
[OUT] The data buffer. |
|
VMUINT length |
[OUT] The data length. |
static VMINT g_tcp_sync_hd; void hl_tcp_sync(void) { VMINT read_data; VMBYTE buf[1024]; VMINT ret; g_tcp_sync_hd = vm_tcp_connect_sync("123.123.123.123", 80, VM_BEARER_DATA_ACCOUNT_TYPE_GPRS_NON_PROXY); read_data = vm_tcp_read_sync(g_tcp_sync_hd, buf, 1024); ret = vm_tcp_close_sync(g_tcp_sync_hd); }
vmtcp.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.