This function sends data to a host which was previously connected.
|
Parameters |
Description |
|
VM_TCP_HANDLE client_handle |
[IN] The client handle. |
|
const void* data |
[IN] The data to be sent. |
|
VMUINT length |
[IN] The data length. |
>=0: the number of bytes sent
<0 : an error code in VM_TCP_RESULT.
void hl_tcp_sync_srv(void) { vm_ip_address_t addr; VMINT ret; char buf[1024] = {0}; VMINT hdl_c; VMINT hdl_s = vm_tcp_server_init_sync(1, 3500); hdl_c = vm_tcp_server_accept_sync(hdl_s, &addr); ret = vm_tcp_server_read_sync(hdl_c, buf, 1024); ret = vm_tcp_server_write_sync(hdl_c, "aaa", 3); vm_tcp_server_close_client_sync(hdl_c); }
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.