MOGSY Posted February 11, 2020 Share Posted February 11, 2020 Hi I would appreciate if one could show how to post a message to a particular session, or invoke a function in a particular session. I would like to run a function in a session and this happens when I get an external message in the server module. Thanks 1 1 Quote Link to comment Share on other sites More sharing options...
Kenneth Posted August 19, 2020 Share Posted August 19, 2020 Up! 1 Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted August 19, 2020 Share Posted August 19, 2020 Hi, Are you planning to use HyperServer? Also, don't forget that to able to interact with the client-side, you have to get an event from the client. So even you sent a message to the client, it will wait for the next event. I would rather use WebSocket. Quote Link to comment Share on other sites More sharing options...
Kenneth Posted August 19, 2020 Share Posted August 19, 2020 yes I did, the example is below. I thought it might be possible to send messages through sessions. Quote Link to comment Share on other sites More sharing options...
Kenneth Posted August 21, 2020 Share Posted August 21, 2020 @Hayri ASLAN Do you have a solution for how you can receive notifications for a desktop application from the server? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted August 21, 2020 Share Posted August 21, 2020 6 hours ago, Kenneth said: @Hayri ASLAN Do you have a solution for how you can receive notifications for a desktop application from the server? Hi, Can you please clarify? Quote Link to comment Share on other sites More sharing options...
Kenneth Posted August 22, 2020 Share Posted August 22, 2020 I have a Unigui server and I also have a Windows application with Internet access. How can I send a message from the server so that the Windows application can receive it. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted August 23, 2020 Author Share Posted August 23, 2020 Hi To send message from your UniGui to your window application try this. try Params := TStringStream.Create(''); IdHTTP1.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1'; IdHTTP1.Request.CustomHeaders.AddValue('authorization','BASIC your authorization here'); IdHTTP1.Request.CustomHeaders.AddValue('VersionID',VersionID); IdHTTP1.Request.CustomHeaders.AddValue('companyID',aCompanyID); Params.WriteString(Body); URL := 'http://127.0.0.1:8402/yourAPI'; //your server IP and port and any other arg you want IdHTTP1.Request.Method := 'POST'; IdHTTP1.Request.Source := Params; IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded'; res := TStringStream.create(''); IdHTTP1.ConnectTimeout := 20000; IdHTTP1.post(URL,params,res); finally FreeAndNil(Params); FreeAndNil(res); end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.