Syntax
VM_TCP_HANDLE vm_tcp_connect_sync(
    const VMCHAR* ip, 
    const VMINT port, 
    VM_BEARER_DATA_ACCOUNT_TYPE data_account_type
);
ContentsIndex
PreviousUpNext
vm_tcp_connect_sync
Example
Syntax
VM_TCP_HANDLE vm_tcp_connect_sync(
    const VMCHAR* ip, 
    const VMINT port, 
    VM_BEARER_DATA_ACCOUNT_TYPE data_account_type
);
Description

This function creates a TCP connection synchronously and it will be blocked until it is connected.

Parameters
Parameters 
Description 
const VMCHAR* ip 
[IN] The destination host IP with format "123.123.123.123". 
const VMINT port 
[IN] The destination host port. data account : [IN] The data account to use. 
Returns

On success - the TCP handle. 

On failure - an error code, please check VM_TCP_RESULT.

Example
 static VMINT g_tcp_sync_hd;
 void hl_tcp_sync(void)
 {
     g_tcp_sync_hd = vm_tcp_connect_sync("123.123.123.123", 80, VM_BEARER_DATA_ACCOUNT_TYPE_GPRS_NON_PROXY);
 }
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.