Skip to content

TAdvancedSingleInstance.ClientPeekCustomResponse

Check whether the server posted a response.

Declaration

Source position: advancedsingleinstance.pas line 68

public 
function TAdvancedSingleInstance.ClientPeekCustomResponse
                                                         (const aStream: TStream; 
                                                         out outMsgType: Integer)
                                                          : Boolean;

Description

ClientPeekCustomResponse checks if the server posted any responses. It returns True if there was a message, and returns the message type in outMesgType, the payload is read into the stream aStream. The message timeout TimeoutMessages is observed: if no message arrived before the timeout expires the call will return False.

Errors

If this application instance is not a client instance, then a ESingleInstance exception is raised. The aStream must be non-nil, or an access violation will occur.

See also

Name Description
TimeoutMessages
TAdvancedSingleInstance.ServerPostCustomResponse Post a server response to the client.