|
Well, I guess it never hurts to first consider the obvious
thanx!
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Suppose a TCP/IP server application is running on a Wndows 2000 machine. It listens on a certain port and various clients can connect via this port.
Now what is the limit of connections, this server can accept from clients by default in Win2k. (Assume there is no other load on server it just accepts connections).
Is there any way we can increase the number of sockets to be accepted in Win2k ???
PaunTM
|
|
|
|
|
The EULA forbids you to accept more than 10 incoming connections for a Workstation, so that would be the limit (at least it used to forbid you, but since they apparently change EULA's with even security patches nowadays it might be even worse). AFAIK this is an accumulated maximum for _all_ IP-based services/server-style-connections, basically making what used-to-be-known-as "NT Workstation" unusable for anything server-ish net-related.
The only (legal) way to increase this would be to cash up a lot of (I believe the technical term is "shitload") of money to get the Server (or DataCenter or whatever they call it this week), even that it technically is AFAIK exactly zero difference wrt the IP stack between the different versions.
Perhaps you could just try to connect with a bunch of clients and see what limit you get?
|
|
|
|
|
I think that 2k pro will accept unlimited connections (or to the limit of the hardware/software). BUT, lets say 11 connection attempts come in at once to this same box. One of them will be denied or blocked until the others are processed. This is one of the limits removed by a 'Server' version.
This simply limits the rate at which remote clients can connect. Further attempts bounce or block, but probably bounce (bouncing makes it unreliable as a server platform blocking merely slows it down.)
MS doesnt want to limit the total number of raw connections because some applications use multiple sockets in order do their thing. For instance, a P2P app may have many connections open.
cant remember where I read this, or if this is what I read.
|
|
|
|
|
How to get the handle of interface of Iwebbrowser2 from CHtmlView:
ak
|
|
|
|
|
IWebBrowser2 is protected member variable(m_pBrowserApp) of CHtmlView class.
If you are using within CHtmlView derived class u can directly access 'm_pBrowserApp' or else you have to write a delegating function.
Hth,
Ramu
|
|
|
|
|
Hi all, I would like to be able to detect all the display modes capable by my graphics card. I am using DirectDraw/Direct3D and have all the necessary enumeration callback procedures in place. However I have a problem:
I want an array of custom mode structs that store the width, height and BitsPixel of a particular display mode (so I can reference it later), but don't know how many available display modes there are until they have all been cycled through in the enumeration function. This means I cannot initialise the array, and there for store the mode information as it goes along. Does this mean I have to use a vector of structs and make it grow as I find new modes? or is there a better way of getting this information before I convert into my custom struct? maybe using a different storage method?
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
There aren't a whole lot of modes, why not just use a static array of say 50 DEVMODE structs?
Jason Henderson quasi-homepage articles "Like it or not, I'm right!"
|
|
|
|
|
Jason Henderson wrote:
There aren't a whole lot of modes, why not just use a static array of say 50 DEVMODE structs?
Because it's wrong and will fail. Actually, a program (game demo) I tested just the other day had exactly this hardcoded limit and failed miserably. You weren't involved in that code by any chance? :->
At this machine (a plain NT5 machine with a reasonably good monitor) I currently have 144 different display modes. If I swicth to a "hotter" Gfx card I'll surely get over 200 different modes.
If you don't want your app to fail, don't use hard-coded limits for stuff like this.
|
|
|
|
|
Mike Nordell wrote:
You weren't involved in that code by any chance?
No.
I had no idea there would be that many modes. It was just a suggestion.
Jason Henderson quasi-homepage articles "Like it or not, I'm right!"
|
|
|
|
|
Why use a plain array when there are so many good collection classes already in C++. A plain std::vector seems to be the final storage type for this, but while enumerating you could use just about whatever collection type you like.
|
|
|
|
|
Thanks for the suggestions. After a little thought I decided to go with the std::vector method, because it is dynamic and will only take up the required amount of precious memory. I can always set a limit to the number of modes I want to read in, but at least the memory allocation will be efficient...
Thanks for the suggestion guys, very much appreciated.
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hi all,
I have an MFC application that I is working in debug mode. However when I build it in Release mode, it appears to me that the global instance of my CWinApp derived class does not exist in the application. Therefore when the app goes to reference that object, it is referencing bad memory and the application crashes.
Does anybody know of a project setting, include file, or piece of code that would cause this problem, or does anyone at least know how to fix this?
Any insight would be greatly appreciated.
Thanks
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I think there is a bug in your application. It is declared like CMyApp the App; , so it exists regardless of the configuration. Could you please show some code when you reference that object?
Best regards,
Alexandru Savescu
|
|
|
|
|
You may be right about the problem being with my code. But I can get both debug and release builds to compile and start running.
The one main thing that confuses me is that the winApp object is present and gets initialized in debug mode, but it is like it never gets initialized or recognized in Release mode. So the first time that the winapp object is referenced it crashes.
If I trace to where MFC gets its pointer to the WinApp object (inside of the MFC source code), and I type the name of the Winapp variable in the watch window, it does not recognize the variable and thinks that it does not exist.
As far as posting some code what would you like to see? My instance of the CWinApp object is declared like this inside of my main cpp file:
CAMClientApp theApp;
It is declared like this in the matchin header file:
extern CAMClientApp theApp;
Thanks for your help, if you have any other ideas I would like to hear them.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Try to not declare it extern in the header file and use the AfxGetApp() function to refer it. If it still crashes, compile the realese with debug information and try some debugging.
Best regards,
Alexandru Savescu
|
|
|
|
|
I would like to let everyone know that I have narrowed it down to the optimizations setting in the project properties.
If I change the setting to anything but "default" or "disable", I get this weird problem. I allow function inlining and that seems to be ok.
After my deadline I will do customized optimizations and see if I can narrow it down to the optimization that is causing this problem.
In the meantime if anyone else has any ideas to what could cause this weird problem that I am seeing, I would really appreciate your feedback.
Thank you,
Paul
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
my problem is : I have an exe which has used SDK & is coded in c & c++.Now i have to give Doc/View Architecture support to the exe for implementing some functionality of MFC.
I tried to make a regular Dll (having Doc/View arch' & exporting a function to be used by exe) but it didnt work proprely
Can anyone suggest me the way to do the above
surbinsho
|
|
|
|
|
I was following Mauricio Ritter's intro, http://www.codeproject.com/directx/BasicDD.asp
when I realized that after I alt-tab'ed out of the program, I can no longer go back in. How should I modify the code so that I can reenter the program?
Thanks
|
|
|
|
|
I have the handle of the iexploerer window,now I want send a message to back or forward the page.
Any function or Message?
Best Regards!
|
|
|
|
|
how can u return the value of an unsigned char...example code:
----example code-------
typedef{unsigned char data[16]}data_out;
----end code-----------
|
|
|
|
|
I hate typedefs, and this one is totallystupid.
unsigned char c = *(&data_out + 2);
gets you the third element ( data[2] )
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
|
i guess server socket must be on NT Server platform and client socket can be on any platform (95/98/200/station etc.).
is the 'guess' right?
if i install more software, can i run them on different plateform?
thanks.
includeh10
|
|
|
|
|
No no, a server socket is simply any socket on any platform which is listening for a connection.
a client socket can be any socket which is connected to a server socket.
This has nothing to do with the fact that the actual computer is a server or client. a server machine can connect to your personal computer, but its socket is still called the 'client' socket.
There may be limits on the number of connections an OS can accept at once, etc., but still, that doesnt stop you from using even windows 3.1 sockets as 'server' sockets.
|
|
|
|