Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Async socket?

1 view
Skip to first unread message

MiLa

unread,
Mar 17, 2000, 3:00:00 AM3/17/00
to
Hi,

What is the best way to do a asynchronous socket (for reading socket)
in application without userinterface?

Those WSAAsyncXXX methods want that window handle ...

Any sample or hint?

Regards

MiLa


Daniel Weber

unread,
Mar 18, 2000, 3:00:00 AM3/18/00
to
Hi,

> What is the best way to do a asynchronous socket (for reading socket)
> in application without userinterface?
>
> Those WSAAsyncXXX methods want that window handle ...

You'll alway need a window if you wan't asynchronous sockets, because after
these functions have done their job, they have to inform you about it, and
the only way is to send a message to a window.

But you can use a hidden window! ( w/o WS_VISIBLE )

Bye,
Daniel

MiLa

unread,
Mar 19, 2000, 3:00:00 AM3/19/00
to
Ok, Thanks for answering.
I thought also that hidden windows but it sounded a little bit "exaggerated"
first.
How about Berkeley sockets? Can they use asynchronous reading?
Or can I use overlapping reading with WinSockets?

Regards
Mikko

Daniel Weber wrote in message ...

Lars Gregersen

unread,
Mar 20, 2000, 3:00:00 AM3/20/00
to
On Fri, 17 Mar 2000 18:50:45 GMT, "MiLa" <mi...@pcuf.fi> wrote:

>Hi,
>
>What is the best way to do a asynchronous socket (for reading socket)
>in application without userinterface?

You use the same method as is used on Unix. Use the select function.
It can test a set of sockets for information to send/read and will
furthermore allow you to have a timeout.

This is covered by any Unix books on networks/sockets

Lars

------------------------------
Lars Gregersen (l...@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
http://members.xoom.com/gregersenweb/

Daniel Longley

unread,
Mar 21, 2000, 3:00:00 AM3/21/00
to
Overlapped ReadFile and WriteFile operations, using the SOCKET as a HANDLE.

D

Lars Gregersen <l...@kt.dtu.dk> wrote in message
news:38d60b31...@news.dtu.dk...

0 new messages