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. 2 4323
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
On 6 mar, 14:57, Lionel B <m...@privacy.n etwrote:
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Google Mike |
last post by:
I want to prepare some training for some new employees regarding the
topic of multithreaded socket services implemented in PHP. I've been
able to implement this with my own design, but I'd like to hear your
thoughts on what you think are some good design goals, such as
answering a question like, "Would you open a pack of 5 socket
listeners each time you go over a socket threshhold, just to make the
server that much more available?" Or...
|
by: John Lull |
last post by:
I'm writing a multithreaded COM server to manage a pool of hardware resources.
All objects are designed to be thread-safe, and I've set sys.coinit_flags to
COINIT_MULTITHREADED before importing pythoncom.
The problem is that all requests to the server seem to be serialized by COM. To
demonstrate the problem, I'm including a simple test server that exposes one
interface object, PyComThreads.Application, with a single method sleep(delay)....
|
by: pradyumna |
last post by:
In Project settins - C/C++ - Code Generation,
what is the difference between the option
"Multithreaded" and "Multithreaded DLL".
I understand that on selecting multithreaded option,
single and multithreaded applications can both use that
dll, but what about multithreaded DLL option.
Thanks
|
by: daniel.bron |
last post by:
I'm maintaining a C++ application written by a developer who has now
left. The app is a multithreaded client/server app for financial data.
My compiler is MS visual C++ 6.0.
I'm a C++ neophyte. I took some C (not C++) courses in college, this is
the only production C++ code I've worked with.
I'm trying to add some logging, and having problems.
My logging scheme is to have a global ofstream, which I initialize in a
|
by: BBryant |
last post by:
Here is the scenario;
Two sockets are bound on two seperate UDP ports, 46999 and 47000. Both
sockets initilize, and are bound to the ports as expected, however only
port 46999 receives data.
Any help is greatly appreciated, here is the code;
| |
by: Sidd |
last post by:
Hi,
I tried finding and example of multithreaded client-serve program in
python. Can any one please tell me how to write a multithreaded
client-server programn in python such that
1.It can handle multiple connections
2.It uses actual threads and not select() or some other function
|
by: Pavils Jurjans |
last post by:
Hello,
I wanted to get some light in the subject. As I develop ASP.NET
applications, it's necessary to understand how exactly the server- communication happens. It seems like initially application is
"sleeping", and it is not loaded in the memory. Then, after very first
request to the app, it is compiled (aspx files), loaded into memory, and
executed. Then, a separate thread is issued to serve my page request, and it
takes care for me...
|
by: Alan Kemp |
last post by:
Hi,
I have a problem that is half python, half design. I have a
multithreaded network server working, each client request spawns a new
thread which deals with that client for as long as it is connected
(think ftp style rather than http style connections here). Each thread
gets passed a reference to the main server to access things like the
list of connected clients, global data, etc.
Now I want to add a database to store usernames...
|
by: akmkat |
last post by:
Hi all,
I am in a great problem. I am trying to implement a multithreaded server using java, first look at the code...
/*------- Main Server (server.java)--------------*/
import java.io.* ;
import java.net.* ;
public class server
{
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |