Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width35%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleOn the page:
borderStylesolid
Table of Contents



Column
 


The iidk.h header file contains extra functions that are listed below. The Connect4, SendData4, SendFile and GetMsg functions should not be used. They are created for internal use. The Connect2 function is not used.

...

Code Block
languagecpp
BOOL Connect3(LPCTSTR ip, LPCTSTR port, LPCTSTR id, iidk_callback_func* lpfunc,
                DWORD user_param,int async_connect,DWORD connect_attempts)


Parameter

Description

ip

IP address of Intellect Server

port

TCP/IP port over which the connection is established

id

Slave connection ID, for video

lpfunc

Callback function receiving messages from Intellect

user_param

Extra parameter that comes to Callback function in order to split slaves if there is only one function.

async_connect

0 - synchronous connection mode, the function returns TRUE if the connection is established.

-1 - asynchronous connection mode, the function always returns FALSE if the connection is established, then the CONNECTED event is created.

Any other value – at first the synchronous mode is used, in case of fault - asynchronous mode.  

connect_attempts

Number of connection attempts.

SendReactToCore

The function is used to send a reaction to the specific core.

Code Block
languagecpp
 BOOL SendReactToCore(LPCTSTR id, LPCTSTR msg)


Parameter

Description

id

Core connection ID

msg

Messages sent. Message format is similar to SendMsg.

IsConnected

IsConnected returns TRUE if the client is connected to server.

Code Block
languagecpp
BOOL IsConnected();

...


Connect4

Code Block
languagecpp
BOOL Connect4(LPCTSTR ip, LPCTSTR port, LPCTSTR id,  iidk_callback_func* lpfunc,
                iidk_frame_callback_func* lpframe_func, iidk_user_data_func* iidk_user_data_func,
                DWORD user_param,int async_connect,DWORD connect_attempts);


Parameter

Description

ip

IP address of Intellect Server

port

TCP/IP port over which the connection is established

id

Core connection ID, for video

lpfunc

Callback function receiving messages from Intellect

lpframe_func

Callback function receiving video frames

iidk_user_data_func

Callback function for data sent using the SendData4 function

user_param

Extra parameter that comes to the Callback function in order to split slaves if there is only one Callback function for all cores.

async_connect

0 - synchronous connection mode, the function returns TRUE if the connection is established 

-1 - asynchronous connection mode, the function always returns FALSE. If the connection is established, then the CONNECTED event is created

Any other value – at first the synchronous mode is used, in case of fault - asynchronous mode.

connect_attempts

Number of connection attempts

SendData4

This function is used to send CUserNetObject. Its purpose is to send raw data.

Code Block
languagecpp
BOOL SendData4(LPCTSTR id, int nIdent,BYTE *pBuffer,DWORD dwSize);


Parameter

Description

id

Core connection ID

nIdent

Data UID

pBuffer

Transmitted data

dwSize

The size of data array

SendFile

The function is used to send a file.

Code Block
languagecpp
BOOL SendFile(LPCTSTR id, LPCTSTR file_from, LPCTSTR file_to)


Parameter

Description

id

Core connection ID

file_from

Address to send file from.

file_to

Address to send file to.

GetMsg

The function is used to retrieve incoming messages that are queued if the Callback function is not specified.

Code Block
languagecpp
BOOL GetMsg(LPTSTR msg, DWORD& cb)


Parameter

Description

msg

Incoming message

cb

Message length


SetPingTime

The function enables and sets the interval for sending KeepAlive messages to the Intellect core. It is enough to call the function once, for example, after calling CreateClient.

Code Block
languagecpp
void SetPingTime(intptr_t clientId, unsigned int time);


Parameter

Description

clientId

Client ID

time

The interval for sending KeepAlive messages in milliseconds.

The minimum value is 5000; if a smaller value (but not 0) is specified, then the value 5000 will be used.

If set to 0, then sending KeepAlive messages is stopped.