Appendices > The MvTCP Communication Layer > Mixing the MvTCP Main loop with an External Main Loop > Registering MvTCP File Descriptors to an External Main Loop
 
Registering MvTCP File Descriptors to an External Main Loop
If you want to run your own main loop, you have to incorporate MvTCP file descriptors with it and call a predefined function to process the data received by these file descriptors.
If you want to be notified when MvTCP creates or deletes file descriptors,
use the functions IlsTcpMvProcess::SetCreateFDCallback and IlsTcpMvProcess::SetRemoveFDCallback to register the two callbacks.
When you detect an event in one of the MvTCP file descriptors, call the function IlsTcpMvProcess::ProcessFD to process the incoming data.
Note: This method must be called after the MvTCP process has been initialized. When the function SetCreateFDCallback is called, Rogue Wave Server immediately calls the callback you provided with the file descriptor used to listen for incoming connection requests.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.