PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Toolkit (TKPDev/TKEDev)
Version:
OS:All
Keywords:convert sockets
Category:Porting/Knowledge Base


Is there any way to convert a Windows socket into a NuTCRACKER Platform socket and vice versa?


It is possible to retrieve the underlying Win32 handle from the NuTCRACKER Platform with the _NutFdToHandle() API (or donate a handle to the NuTCRACKER Platform with _NutHandleToFd()). It is not possible, however, to share socket handles in this way. Once the NuTCRACKER Platform owns a socket handle, you may not continue to manipulate it with Win32 calls and vice versa.