WSAAsyncSelect in .Net framework

  • Thread starter Thread starter Yuancai \(Charlie\) Ye
  • Start date Start date
Y

Yuancai \(Charlie\) Ye

hi,
No! dotNet framework losts all of WSAXXX api functions. However, my
SocketPro has it.

--
Yuancai (Charlie) Ye

Fast and securely accessing all of remote data sources anywhere with
SocketPro using batch/queue, asynchrony and parallel computation

See 30 well-tested and real OLEDB examples

RDB, a tool for fast and securely accessing remote databases with dial-up,
cable, DSL and wireless modems anywhere
www.udaparts.com
 
Why not do Socket.Select in another thread and report back to application
window using one of many options (push/pull, etc) Think you do pretty much
what you want via some design work. Post back if other questions of this.
Cheers!
 
Look at all the "Begin..." and "End..." functions in sockets, for example
BeginConnect, BeginAccept, BeginSend, BeginReceive, etc, these are all async
functions. You won't get the socket close directly, but if you issue or have
an outstanding read/write, etc, you will realize that in the handler
routine.
 
Now you say 1000 :-) IIRC, when your talking about the Async methods
(Begin..), your talking Thread pool. I am wondering if you will have
fairness issues here or other issues relating to the thread pool. Not sure.
If you have a dedicated machine you can probably get 700-800 threads without
a problem and simplify your implementation dramatically. I know it sounds
crazy, but had a long talk with the Indy .Net guy about this and he was
right and it works. The cpu will handle fairness via normal thread
scheduling. You may also want to checkout the Indy .Net library for socket
stuff. They also can use Fibers to allow more connections.

--
William Stacey, MVP

Vladimir Scherbina said:
hello William,
sure, Socket.Select is another way of solving my problem, but imagine, if i
have for example 1000 cleints and 1 server, each client is accepted by
server.
server has 1000 sockets, in the way you propose server should call Select
for each socket at some time on a loop... but this architecture is looking
strange (as for me)
i am wrong ?
 
hello all,

is thery any equivalent in .Net Framework of WSAAsyncSelect win32 api
function ?
I want my application window being notifyed about network events...
(asyncroniously)

or maybe another way exists ?
 
hello William,
sure, Socket.Select is another way of solving my problem, but imagine, if i
have for example 1000 cleints and 1 server, each client is accepted by
server.
server has 1000 sockets, in the way you propose server should call Select
for each socket at some time on a loop... but this architecture is looking
strange (as for me)
i am wrong ?
 
Back
Top