Gets the socket descriptor for a connection handle. The socket descriptor can be used with the Message Builder REGISTER module to wait for a socket to be ready for read or write access. This function is only needed if the program using the Message Feed connection must not block while waiting for a reply from the Message Feed server.
The function returns a socket descriptor.
Note: Do not attempt to use the socket descriptor for any other purpose than waiting for read or write access using the REGISTER or equivalent module.
MFP.GetSocket(hMFP);
hMFP
is the handle to the Message Feed connection. It is a record of type MFP.Handle
.
When an error occurs, the function throws an exception of type MFP.$Exception
and sets the $Error
reserved variable to one of the values:
MFP.$Error_ErrorGetSocketInvalidid
– The hMFP parameter refers an unknown connection handle.MFP.$Error_ErrorGetSocketFailed
– Failed to get a valid socket descriptor for the specified handle.