Syntax
int vm_soc_socket_ex(
    int family, 
    int type, 
    int protocol, 
    unsigned int data_account_id
);
ContentsIndex
PreviousUpNext
vm_soc_socket_ex
Syntax
int vm_soc_socket_ex(
    int family, 
    int type, 
    int protocol, 
    unsigned int data_account_id
);
Description

Creates a socket with a particular bearer, as specified by the data_account_id. In contrast, the vm_soc_socket() creates a socket with the latest opened bearer.

Parameters
Parameters 
Description 
int family 
[IN] Specifies the address family, PF_INET or PF_INET6
int type 
[IN] Specifies the type for the new socket. SOCK_STREAM = connection based type. SOCK_DGRAM = datagram connectionless type. 
int protocol 
[IN] Particular protocol to be used with the socket that is specific to the indicated address family. 
unsigned int data_account_id 
[IN] Data account for network which was obtained from the callback parameter of vm_bearer_open(). 
Return Values
Return Values 
Description 
Non-negative number 
Socket ID for the newly created socket.
 
VM_SOC_INVAL 
Wrong parameters, domain, type, or protocol.
 
VM_SOC_LIMIT_RESOURCE 
No socket available.
 
VM_SOC_BEARER_FAIL 
Bearer broken. 
File

vmsock.h

Notes

It is advised to use BSD socket API all in one sub-thread.

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.