Syntax
VMINT vm_tcp_write(
    VM_TCP_HANDLE handle, 
    void* buffer, 
    VMUINT length
);
ContentsIndex
PreviousUpNext
vm_tcp_write
Example
Syntax
VMINT vm_tcp_write(
    VM_TCP_HANDLE handle, 
    void* buffer, 
    VMUINT length
);
Description

This function writes data to TCP connection.

Parameters
Parameters 
Description 
buf 
[IN] The data to write. 
len 
[IN] The data length. 
Returns

If successful, it returns the write data size. 

If fails, the error code can be found in VM_TCP_RESULT.

Example
 void hl_tcp_conn_cb(VM_TCP_HANDLE handle, VM_TCP_EVENT event)
 {
     VMINT nwrite;
     switch (event)
     {
         case VM_TCP_EVENT_CONNECTED:
             nwrite = vm_tcp_write(
                         handle,
                         "GET www.mediatek.com HTTP/1.1rnHost: www.mediatek.comrnrn",
                         strlen("GET www.mediatek.com HTTP/1.1rnHost: www.mediatek.comrnrn"));
             break;
         default:
             return;
     }
     return;
 }
File

vmtcp.h

Group
Created with a commercial version of 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.