![]() |
|
Asynchronous sockets with ALLEGRO_EVENT_QUEUE |
Addison Elliott
Member #12,394
November 2010
|
I just started working with asynchronous sockets today and noticed that the WSAAsyncSelect has a parameter of HWND to send events too. I am pretty sure there's a function to get the HWND handle from a ALLEGRO_DISPLAY, but not sure what would happen if I registered that Does anyone know a way to get asynchronous sockets to emit events to a ALLEGRO_EVENT_QUEUE? |
Matthew Leverton
Supreme Loser
January 1999
![]() |
If you use the SVN version of Allegro you can use this after registering the hwnd: bool net_event(ALLEGRO_DISPLAY *d, UINT msg, WPARAM w, LPARAM l) { if (msg == WM_SOCKET) { // do something return true; } return false; } al_add_win_window_callback(display, net_event);
|
jmasterx
Member #11,410
October 2009
|
Cool, could that be used for menus as well? Agui GUI API -> https://github.com/jmasterx/Agui |
Matthew Leverton
Supreme Loser
January 1999
![]() |
|