Transferring Data and Sound

While a network connection is open, you can transfer data between local and remote computers. To send data, use the InetSendData method. This generates an InetReceiveData event on the remote computer. To send a bitmap to a remote computer, call the InetSendBitmap method or InetSendDIB method. A call to either of these methods generates an InetReceiveBitmap event on the remote computer. To send sound data, use the InetSendSound method. This generates an InetReceiveSound event on the remote computer. During the sending process, data not immediately sent is held in a queue. As data is removed from the queue and sent to the remote computer, an InetSending event is generated. Prior to the first InetReceiveData event, an InetReceiveStart event is generated to indicate that a computer is about to start receiving data from a remote computer. Right after the InetReceiveStart event is generated, an InetReceiving event is generated. This event is generated for each chunk of data received. To send data to more than one computer, use the SendList property. The SendListNum property contains the number of computers in the SendList array. When all data for a specific object has been sent, an InetDetaSent event is generated. For Delphi, the InetGetData method can be used to get user-defined data sent through an Internet connection. The InetClearQueue method lets you clear the internal queue and abort data transfers. To determine the size of the internal queue, use the InetQueueSize property. Network errors generate an InetError event.