Passing a NULL status argument to MgslTransmit causes MgslTransmit to complete when the data is buffered but not sent. Repeated calls to MgslTransmit with a NULL status argument allows multiple buffers of send data to be queued in the API. The API continues sending the buffers without delay or idle time between frames or blocks of data.
If there are free send buffers, the API returns ERROR_SUCCESS, otherwise it returns ERROR_IO_PENDING and signals the overlapped event when send buffers are available and the data is accepted.
If the application calls MgslCancelTransmit() or disables the transmitter by passing a value of FALSE to MgslEnableTransmitter(), all buffered transmit data is discarded.
To wait until all buffered send data has been sent, call MgslTransmit() with a BufferSize argument of 0. If all data has been sent, the API returns ERROR_SUCCESS, otherwise ERROR_IO_PENDING is returned and the overlapped event is signaled when all data has been sent.
| Previous | Contents | Next |