NetCoreServer icon indicating copy to clipboard operation
NetCoreServer copied to clipboard

TPL with NetCoreServer

Open shoaibshakeel381 opened this issue 4 years ago • 6 comments

From the looks of it all variations of On*() methods like OnReceived, OnSent etc are synchronous method. Any suggestions on how can I use async/await to do labor disk/network tasks?

Basically, does NetCoreServer support TPL?

shoaibshakeel381 avatar Feb 23 '21 15:02 shoaibshakeel381

Seems like TPL support in System.Net.Sockets namespace is coming in .NET 7 (i.e. ReceiveAsync). @chronoxor Any plans on upgrading NetCoreServer lib?

P.S. I'll be glad to help/contribute with an upgrade.

eng1n88r avatar Apr 25 '22 03:04 eng1n88r

Upgrading to TPL should be done very carefully with benchmarking the performance. I'll look into it after .NET 7 official release. This release is very welcome because of supporting TLS 1.3 for MacOS!

chronoxor avatar May 12 '22 21:05 chronoxor

@chronoxor I noticed that project got the .NET 7 update. Were you able to look into TPL usage? Did any performance benchmarks?

eng1n88r avatar Feb 15 '23 18:02 eng1n88r

You can try to use it right now accessing connected socked using public Socket Socket property and call its ReceiveAsync() method.

chronoxor avatar Feb 15 '23 18:02 chronoxor

Thanks, I will definitely try it out, just wanted to check if you have already done some evaluation/benchmarking. Any work in progress on TPL integration?

eng1n88r avatar Feb 15 '23 20:02 eng1n88r

Anyone did an investigation on this post .net 7 ?

wave9d avatar May 06 '23 20:05 wave9d