MOGSY Posted January 18, 2020 Share Posted January 18, 2020 Hi What is the recommended method for communicating with a socket connection. I would like to communicate with other services which have socket connection. Thank you. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 19, 2020 Author Share Posted January 19, 2020 Hi Using TServerSocket or TClientSocket, will make connection and sends first message but it stops responding after that. Is there another components that can be used? Thanks. 1 Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 20, 2020 Author Share Posted January 20, 2020 Hi Sorry for reminding, communication between different applications surly is very useful and desirable, I think it would be extremely helpful any help or suggestions to resolve this issue. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted January 21, 2020 Share Posted January 21, 2020 There is a demo on forum (that works) on WebSocket with Unigui, server side. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 21, 2020 Author Share Posted January 21, 2020 Hi I would appreciate it if you point me to the link, I did not find it. Thanks Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted January 21, 2020 Share Posted January 21, 2020 1 hour ago, MOGSY said: Hi I would appreciate it if you point me to the link, I did not find it. Thanks Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 22, 2020 Share Posted January 22, 2020 We have created our own library from scratch using winsock2 api running on our separate thread and it works perfectly. We have over 5000 simultaneous chat sessions and other comunications without problems. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 22, 2020 Author Share Posted January 22, 2020 Thanks for your response. Can you suggest where to start? Regards Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 22, 2020 Share Posted January 22, 2020 43 minutes ago, MOGSY said: Thanks for your response. Can you suggest where to start? Regards I suggest you to create a raw socket, threadded, using only winsock2 library (do not use any component that relies on Windows messaging for communications) OR Use Indy sockets in case you do not need realtime communications. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 22, 2020 Author Share Posted January 22, 2020 Thanks Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 24, 2020 Author Share Posted January 24, 2020 Hi Robert I have tried this what happens the socket connects and is active, however it does not receive any message. Are you able to use different ports? Regards Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 25, 2020 Author Share Posted January 25, 2020 Hi I have tried different components, TServerSocket and TClientSocket, sgcWebSocketServer, sgcWebSocketClient and TIdTCPClient. Unfortunatly none is able to commuinicate and it appears that UniGui is stopping the socket from commuinicating. I have attached two test project. Would appreciate any suggestion to resolve this issue. Regards ClientSocket.7z ServerSocket.7z Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 28, 2020 Administrators Share Posted January 28, 2020 Hi Components you use should not rely on Windows messaging infrastructure. They should use threads for communication. From what I recall TServerSocket uses Windows messages. However, Indy should work without problem. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 28, 2020 Author Share Posted January 28, 2020 Hi Is there any example for it? Regards Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 28, 2020 Administrators Share Posted January 28, 2020 You can use TIdHttpServer on server side and TIdHttp on client side. I'm sure you can find many examples on the web. 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.