Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF chunk data with stream

HI, I neet to pass chunk data from WCF service to client. I have a table with 16 million records, and so, when the client requests data from that table i open a datareader to that table and serialize and send every record to client,here is my method signature..

public AsyncResult FindAsync(AsyncRequest request)

where AsyncResult and AsyncRequest are MessageContract, and AsyncResult has a stream in it. the problem is that when a client call the metod my function does not returns untill all data is not writed in stream in server... is it possible to change this behavior or I have to use callbacks?

like image 438
Arsen Mkrtchyan Avatar asked Jan 25 '26 22:01

Arsen Mkrtchyan


1 Answers

Yes, you can do a streaming transfer. Check out the "streaming" example at idesign.net. I believe it shows an example of what you want to do.

like image 176
JP Alioto Avatar answered Jan 28 '26 19:01

JP Alioto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!