sdeann 0 Posted July 4, 2023 Hello every one , please i need an example on how to Send/Receive TCP packet with TSocket from System.Net.Socket (cross platform) in an AsyncCallback way or in a separate thread . Thank you in advance . Share this post Link to post
Sherlock 663 Posted July 4, 2023 Hi 😉 So over here I found one thread concerning System.Net.Socket. Sadly there is no use of AsyncCallback in there: But it looks pretty straight forward to me: implement either callback event handler or method and use that as a parameter for BeginReceive. What is your code so far, and where do you get errors/are you stuck? Share this post Link to post
Sherlock 663 Posted July 4, 2023 On the other hand, it is a rather low level component and implementing asynchronous communication involves a lot of ground work. May I suggest moving on to the more powerful components like the Indy or the ICS components. And from the sound of it I think you might want to go with the ICS. Share this post Link to post
sdeann 0 Posted July 4, 2023 1 hour ago, Sherlock said: On the other hand, it is a rather low level component and implementing asynchronous communication involves a lot of ground work. May I suggest moving on to the more powerful components like the Indy or the ICS components. And from the sound of it I think you might want to go with the ICS. Thank you very much , is ICS cross-platform ( mobile ) ?! Share this post Link to post
Sherlock 663 Posted July 4, 2023 It does support POSIX and macOS, so perhaps iOS as well. I am afraid Android is not officially supported though. So perhaps for mobile devices you could go Indy. Share this post Link to post
Angus Robertson 574 Posted July 4, 2023 ICS does not support any mobile platforms, only Mac OS-X now and Linux Ubuntu with the next major release next year.  Angus  1 Share this post Link to post
Lars Fosdal 1791 Posted July 5, 2023 Any plans to add Android/iOS support in the future? Share this post Link to post
Angus Robertson 574 Posted July 5, 2023 I only work with Delphi and Windows platforms, any support for C++ or other platforms in ICS is dependent on other developers, and such contributions are very rare. C++ support will cease unless someone comes forward to take responsibility for it.  I have no commercial need for mobile platforms, and my own requirements are the driving force behind my contributions to ICS over the last 20 years.  Angus  1 Share this post Link to post