c# - Can I use Asynchronous and Synchronous sockets in one project? -
i need able asynchronously receive messages server @ time. however, want use synchronous sockets; when send message want block until response. synchronous , asynchronous play each other, or cause problems?
in other words, use beginreceive() asynchronously listen. if call receive() (synchronous version understand), next incoming message picked receive callback, beginreceive callback, both, neither, or worse?
this happening in client, server can stay 100% asynchronous.
do synchronous , asynchronous play each other?
no. speaking, don't play together.
that's not can never done, it's impossible, , confusing , hard work with. unless have compelling reason otherwise, i'd suggest sticking 1 or other.
Comments
Post a Comment