SocketAsyncEventArgs and ReadAsync

When using the SocketAsyncEventArgs and ReadAsync classes, where do I put the read buffer and where do I put the send buffer? or can I only read or send at the same time not both? I am a bit confused.

+4
source share
3 answers

I think you are looking for the Buffer SocketAsyncEventArgs . This tutorial explains how to use the SocketAsyncEventArgs class correctly.

The MSDN article for the class contains some useful notes and also provides sample code (they are almost always a good start).

+5
source

You can use SocketAsyncEventArgs for only one operation at a time.

To read and write async at the same time, you will need two SocketAsyncEventArgs objects.

+2
source

All Articles