Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Multithreaded server : Problem with WSAEventSelect

Reply
Thread Tools

Multithreaded server : Problem with WSAEventSelect

 
 
NaeiKinDus
Guest
Posts: n/a
 
      03-06-2007
Hi there

I'm trying to code a webserver running under WinXP, multithreaded,
etc...
The creation of my threads, the handles, everything works fine except
this : the WSAEventSelect.

The first occurence of this function is in the main() and manages
connections. If a connection is accepted, it sends the newly created
socket to a thread that will handle both FD_WRITE and FD_READ...
Here's the prob : the second call to the WSAEventSelect fails and
returns WSAENOTSOCK...
I tried to send data thru that socket, and it worked...
What's the deal?
I tried the solution MSDN gave me, with WSAEventSelect(socket, NULL,
0); before setting the thing to FD_READ | FD_WRITE but it still won't
work...

Got an idea ?

Thanks.

 
Reply With Quote
 
 
 
 
Lionel B
Guest
Posts: n/a
 
      03-06-2007
On Tue, 06 Mar 2007 03:39:30 -0800, NaeiKinDus wrote:

> Hi there
>
> I'm trying to code a webserver running under WinXP, multithreaded,
> etc...
> The creation of my threads, the handles, everything works fine except
> this : the WSAEventSelect.


[snip]

Afraid both threading and platform-specific details are off-topic here -
this ng deals purely with C++ *language* issues.

> Got an idea ?


Perhaps you can find a better forum here:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

--
Lionel B
 
Reply With Quote
 
 
 
 
NaeiKinDus
Guest
Posts: n/a
 
      03-06-2007
On 6 mar, 14:57, Lionel B <m...@privacy.net> wrote:
> On Tue, 06 Mar 2007 03:39:30 -0800, NaeiKinDus wrote:
> > Hi there

>
> > I'm trying to code a webserver running under WinXP, multithreaded,
> > etc...
> > The creation of my threads, the handles, everything works fine except
> > this : the WSAEventSelect.

>
> [snip]
>
> Afraid both threading and platform-specific details are off-topic here -
> this ng deals purely with C++ *language* issues.
>
> > Got an idea ?

>
> Perhaps you can find a better forum here:
>
> http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
>
> --
> Lionel B


Sorry for the bother.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-evil multithreaded WSGI server? Gerhard Häring Python 0 08-26-2008 06:20 AM
Help Please - Need to make SOAPpy server multithreaded or handleproblem some other way sberry Python 1 12-13-2007 11:00 PM
Writing Multithreaded Client-Server in Python. Sidd Python 7 09-06-2005 08:01 PM
WSAEventSelect Help BBryant C++ 4 03-16-2005 07:50 PM
Multithreaded COM server problem... John Lull Python 10 01-21-2004 11:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57