This function writes data to an open TCP connection synchronously and it will be blocked until it has finished writing all data.
|
Parameters |
Description |
|
VM_TCP_HANDLE handle |
[IN] The TCP handle. |
|
void* buffer |
[IN] The data to write. |
|
VMUINT length |
[IN] The data length. |
>= 0: The data size of the write data.
< 0: Error code, please check VM_TCP_RESULT.
static VMINT g_tcp_sync_hd; #define send ("GET / HTTP/1.1rnHost: www.mediatek.com:80rnrn") void hl_tcp_sync(void) { VMINT read_data; VMINT ret; g_tcp_sync_hd = vm_tcp_connect_sync("123.123.123.123", 80, VM_BEARER_DATA_ACCOUNT_TYPE_NON_PROXY); ret = vm_tcp_write_sync(g_tcp_sync_hd, send, strlen(send)); 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.