Re: [Libevent-users] libevent on windows: select() fails

2008-06-04 Thread Shiqing Fan

Hi Nick,


Sometimes this means that you haven't called WSAStartup ?  Winsock wants
to be initialized.

  
I was testing with the event-test, which is coming with Libevent 
source.  Although I added WSAStartup, nothing was changed.



Thanks,
Shiqing
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] libevent on windows: select() fails

2008-06-04 Thread Shiqing Fan

Hi Bas Verhoeven ,

Thanks for your reply.

I believe the problem was that select() does not work on file 
descriptors on Windows, as it does on *NIX systems.

Yes,  that's right. But is there any way to fix it?


Thanks,
Shiqing
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] libevent on windows: select() fails

2008-06-03 Thread Bas Verhoeven

Shiqing Fan wrote:

Hi all,

Hi,


I'm testing Libevent 1.3 with VS2005 on Windows.

The same problem below there happens on my machine, select() always 
returns -1. Does anyone know the reason?  Sorry for polling this old 
mail up, I just found someone has asked the same question that I got, 
but no answer.  Thanks a lot.
I believe the problem was that select() does not work on file 
descriptors on Windows, as it does on *NIX systems.


Cheers,
Bas Verhoeven



Regards,
Shiqing


But when I run 'event-test', it seems to die at select():

   V:\dev\libevent-svn\WIN32-Prj\event_test\Debug>event_test.exe
   [msg] libevent using: win32
   [debug] event_add: event: 002DFF1C, EV_READ   call 00433CE0
   [debug] win32_insert: adding event for 916
   [debug] win32_dispatch: select returned -1

Any idea why it would do that, and what I can do to fix it? I would 
really like to start using libevent on windows.


Cheers,
Bas Verhoeven

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users






___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] libevent on windows: select() fails

2008-06-03 Thread Nick Mathewson
On Tue, Jun 03, 2008 at 07:08:57PM +0200, Shiqing Fan wrote:
> Hi all,
> 
> I'm testing Libevent 1.3 with VS2005 on Windows.
> 
> The same problem below there happens on my machine, select() always 
> returns -1. Does anyone know the reason?  Sorry for polling this old 
> mail up, I just found someone has asked the same question that I got, 
> but no answer.  Thanks a lot.

Sometimes this means that you haven't called WSAStartup ?  Winsock wants
to be initialized.


___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] libevent on windows: select() fails

2008-06-03 Thread Shiqing Fan

Hi all,

I'm testing Libevent 1.3 with VS2005 on Windows.

The same problem below there happens on my machine, select() always 
returns -1. Does anyone know the reason?  Sorry for polling this old 
mail up, I just found someone has asked the same question that I got, 
but no answer.  Thanks a lot.



Regards,
Shiqing


But when I run 'event-test', it seems to die at select():

   V:\dev\libevent-svn\WIN32-Prj\event_test\Debug>event_test.exe
   [msg] libevent using: win32
   [debug] event_add: event: 002DFF1C, EV_READ   call 00433CE0
   [debug] win32_insert: adding event for 916
   [debug] win32_dispatch: select returned -1

Any idea why it would do that, and what I can do to fix it? I would 
really like to start using libevent on windows.


Cheers,
Bas Verhoeven

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users




--
--
Shiqing Fan 
http://www.hlrs.de/people/fan

High Performance ComputingTel.: +49 711 685 87234
  Center Stuttgart (HLRS)Fax.: +49 711 685 65832
POSTAL:Nobelstrasse 19email: [EMAIL PROTECTED] 


ACTUAL:Allmandring 30
70569 Stuttgart

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


[Libevent-users] libevent on windows: select() fails

2008-03-13 Thread Bas Verhoeven

Hi,

I have tried compiling libevent (svn, 1.3.99-trunk) for windows with 
MSVC 9 (Visual Studio 2008), after loads of fiddling I managed to 
compile the project with a few minor warnings, and I ended up with a 
"libevent.lib".


I linked ws2_32.lib and got a bunchload of errors while initializing 
libevent. After an hour I figured out that it might be useful to 
initialize winsock before actually using it, for some reason I expected 
libevent to do this.


Things are progressing a bit more, 'time-test' runs fine:

   V:\dev\libevent-svn\WIN32-Prj\time_test\Debug>time_test.exe
   [msg] libevent using: win32
   timeout_cb: called at 1205409820: 2
   timeout_cb: called at 1205409822: 2

So does 'signal-test':
  
   V:\dev\libevent-svn\WIN32-Prj\signal_test\Debug>signal_test.exe

   [msg] libevent using: win32
   signal_cb: got signal 2
   signal_cb: got signal 2
   signal_cb: got signal 2

But when I run 'event-test', it seems to die at select():

   V:\dev\libevent-svn\WIN32-Prj\event_test\Debug>event_test.exe
   [msg] libevent using: win32
   [debug] event_add: event: 002DFF1C, EV_READ   call 00433CE0
   [debug] win32_insert: adding event for 916
   [debug] win32_dispatch: select returned -1

Any idea why it would do that, and what I can do to fix it? I would 
really like to start using libevent on windows.


Cheers,
Bas Verhoeven

___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users