News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

wsock in console

Started by ctt, November 28, 2007, 09:11:31 AM

Previous topic - Next topic

ctt

Hello everyone!

Maybe im just plain stupid (prolly this is the case) but i can't figure out how to handle the events of wsock when im doing application in console.
In every example i've seen it's always WndProc, DlgProc, etc... but what routine is used in console?
If i want to wait for a FD_CONNECT for instance, how do I do that?

Vektor

Use WSACreateEvent / WSAEventSelect / WSAWaitForMultipleEvents / WSAEnumNetworkEvents .

akane

Console app does not restrict you from creating windows. You can create your own window/dialog, or use a hidden, subclassed tooltip window, so you will be able to use WSAAsyncSelect. It works well :)