Click here to Skip to main content
15,915,328 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Generalcreate a window for callbacks Pin
bkelly1311-Nov-13 2:00
bkelly1311-Nov-13 2:00 
GeneralRe: create a window for callbacks Pin
Richard MacCutchan11-Nov-13 3:01
mveRichard MacCutchan11-Nov-13 3:01 
GeneralRe: create a window for callbacks Pin
bkelly1311-Nov-13 4:49
bkelly1311-Nov-13 4:49 
GeneralRe: create a window for callbacks Pin
Richard MacCutchan11-Nov-13 6:33
mveRichard MacCutchan11-Nov-13 6:33 
GeneralRe: create a window for callbacks Pin
bkelly1311-Nov-13 8:33
bkelly1311-Nov-13 8:33 
GeneralRe: create a window for callbacks Pin
Richard MacCutchan11-Nov-13 22:37
mveRichard MacCutchan11-Nov-13 22:37 
GeneralRe: create a window for callbacks Pin
bkelly1312-Nov-13 15:50
bkelly1312-Nov-13 15:50 
AnswerRe: What is the window argument in WSAAsyncSelect(...) Pin
Orjan Westin19-Nov-13 23:25
professionalOrjan Westin19-Nov-13 23:25 
You do not need a window, or a message pump, if you use Winsock2 (see Creating a Basic Winsock Application[^] and it's following articles).

Call socket to create a listening socket, bind it to the host address, set it to be non-blocking with ioctlsocket, and set it to listen with listen. Once listening, accept incoming connections and foist the resulting socket off to its own thread where it can receive data using recv. If there's nothing to accept, sleep for a bit and loop around.

Simple. Smile | :)

(I'd post proper code if I had the right to do so. This is reading from an implementation I wrote for $EMPLOYER a couple of years ago. Somewhere at home I have the code I wrote for myself many years ago, and I'll try to dig it out, write it up, and post it one of these days.)

Alternatively, have you had a look at boost::asio[^]?
GeneralRe: What is the window argument in WSAAsyncSelect(...) Pin
bkelly1321-Nov-13 14:51
bkelly1321-Nov-13 14:51 
QuestionMFC vs STL performance test Pin
Alexander Fedorov18-Oct-13 11:42
Alexander Fedorov18-Oct-13 11:42 
AnswerRe: MFC vs STL performance test Pin
Richard MacCutchan18-Oct-13 21:08
mveRichard MacCutchan18-Oct-13 21:08 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov19-Oct-13 0:46
Alexander Fedorov19-Oct-13 0:46 
GeneralRe: MFC vs STL performance test Pin
pasztorpisti19-Oct-13 4:44
pasztorpisti19-Oct-13 4:44 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov19-Oct-13 5:15
Alexander Fedorov19-Oct-13 5:15 
GeneralRe: MFC vs STL performance test Pin
pasztorpisti19-Oct-13 5:31
pasztorpisti19-Oct-13 5:31 
GeneralRe: MFC vs STL performance test Pin
Richard MacCutchan19-Oct-13 6:21
mveRichard MacCutchan19-Oct-13 6:21 
AnswerRe: MFC vs STL performance test Pin
Aescleal21-Oct-13 23:58
Aescleal21-Oct-13 23:58 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov22-Oct-13 2:05
Alexander Fedorov22-Oct-13 2:05 
GeneralRe: MFC vs STL performance test Pin
Aescleal22-Oct-13 4:44
Aescleal22-Oct-13 4:44 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov22-Oct-13 5:32
Alexander Fedorov22-Oct-13 5:32 
Answerstd::map too slow Pin
bkelly1310-Nov-13 16:08
bkelly1310-Nov-13 16:08 
GeneralRe: std::map too slow Pin
Albert Holguin14-Nov-13 10:02
professionalAlbert Holguin14-Nov-13 10:02 
GeneralRe: std::map too slow Pin
Aescleal15-Nov-13 11:07
Aescleal15-Nov-13 11:07 
GeneralRe: std::map too slow Pin
Albert Holguin15-Nov-13 11:32
professionalAlbert Holguin15-Nov-13 11:32 
QuestionWhy calling sort() crashes? Pin
Kumar Anitesh15-Oct-13 22:38
Kumar Anitesh15-Oct-13 22:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.