Jump to content
sdeann

System.Net.Sockets

Recommended Posts

Hello every one , please i need an example on how to Send/Receive TCP packet with inlink.gifTSocket from System.Net.Socket (cross platform) in an inlink.gifAsyncCallback way or in a separate thread .

Thank you in advance .

Share this post


Link to post

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

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
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

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

ICS does not support any mobile platforms, only Mac OS-X now and Linux Ubuntu with the next major release next year.

 

Angus

 

  • Thanks 1

Share this post


Link to post

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

 

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×