Sending and Receiving Data

The diagram given below shows a simple example of an Peer-to-Peer connection between two computers and a series of function calls used when sending and receiving data.

Computer A

Action

Computer B

LInet::Connect

 

LInet::OnConnect

Step 1.

---------------------------------->
Computer A
requests a connection with Computer B. This generates a call to the OnConnect callback function on the Computer A. Side.

If the connection process from the Computer A side was successful go to step 2.

 

 

Step 2.

OnConnectRequest callback function will be generated on Computer B. side in response to the connection request from Computer A.

LInet::OnConnectRequest

 

Step 3.

<-----------------------------------
Computer B
accepts the connection request by calling AcceptConnect.

LInet::AcceptConnect

 

 

 

 

 

LInet::SendBitmap

Connection established.

And

Computer A wants to send some kind of data, for example image data:

Step 4.

---------------------------------->

 

 

 

 

 

 

 

 

LInet::OnDataSending

 

 

LInet::OnDataSent

Step 5.

On the Computer A side, the following callback functions are generated to let Computer A know the data is being sent or has been sent:
LInet::OnDataSending and
LInet::OnDataSent

------------------------------------>
Calls to the following functions are generated on Computer B.

LInet::OnDataStart
LInet::OnDataReceiving
LInet::OnDataReady
LInet::OnImageReceived

LInet::OnDataStart
LInet::OnDataReceiving

 

 

 

LInet::OnDataReady

LInet::OnImageReceived