Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Internet Applications using VFP 6/7.
Message
From
09/04/2002 15:39:01
 
 
To
27/03/2002 06:55:06
Roman Segaud
Laboratoires Fortepharma
Nice, France
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00630848
Message ID:
00642863
Views:
19
Roman,

thank you reply. It is interesting. I haven't read this before.

However, I think that 5 connection queue limit is sufficient for small-size web server. I don't want to pay for MSWINSOCK replacement, WWC or AFP.
So I continue to use MSWINSOCK and my VFP Web server.

During year, I'm working on a framework to use VFP for data entry from Web.

I try to use VFP 7 web server implementing HTTP protocol and calling VFP
classes.
In client side I use IE 6 with XML data islands.

Have you implemented HTTP protocol in VFP more throughly than in Eeva Webserver ?
Do you have some suggestions or samples to implement this ?

Can you send your code to my email also ?


>Hi Andrus,
>
>First, congratulation for the work you've done with Eetasoft WebServer, I have studied your work to make my own release, and by the way I share my work to anyone asking me the code like you do, I think it's the best way to develop a powerful tool for our communitie.
>
>Yes this is well know limitation documented in MSDN see "backlog parameter specifies the maximum queue length for pending connections", and have a look at Q113576 and Q127144.
>
>MSDN chapter 7 : Winsock Basics
>
>.........
>
>listen
>=======
>
>The next piece of the equation is to put the socket into listening mode. The bind function merely associates the socket with a given address. The API function that tells a socket to wait for incoming connections is listen, which is defined as
>
>int listen(
> SOCKET s,
> int backlog
>);
>
>Again, the first parameter is a bound socket. The backlog parameter specifies the maximum queue length for pending connections. This is important when several simultaneous requests are made to the server. For example, let’s say the backlog parameter is set to 2. If three client requests are made at the same time, the first two will be placed in a “pending” queue so that the application can service their requests. The third connection request will fail with WSAECONNREFUSED. Note that once the server accepts a connection, the connection request is removed from the queue so that others can make a request. The backlog parameter is silently limited to a value determined by the underlying protocol provider. Illegal values are replaced with their nearest legal values. Additionally, there is no standard provision for finding the actual backlog value.
>
>The errors associated with listen are fairly straightforward. By far the most common is WSAEINVAL, which usually indicates that you forgot to call bind before listen. Otherwise, it is possible to receive the WSAEADDRINUSE error on the listen call as opposed to the bind call. This error occurs most often on the bind call.
>........."
>
>*****************************************************************************
>
>Winsock App's Reject Connection Requests with Reset Frames
>
>Q113576
>
>-----------------------------------------------------------------------------
>The information in this article applies to:
>
>Microsoft Windows NT Server version 3.1
>Microsoft Windows NT Workstation version 3.1
>Microsoft Windows NT Advanced Server, version 3.1
>
>-----------------------------------------------------------------------------
>
>SYMPTOM
>If a Windows NT TCP/IP Winsock server application (for example, Microsoft NT SQL Server) is bombarded with multiple simultaneous TCP\IP connection requests, it quickly begins to reject requests by replying with a TCP\IP Reset Frame.
>
>The symptom may be difficult to detect. If you trace this problem with a protocol analyzer you will see that the 7th or 8th TCP SYN connection request frames are replied to with TCP Reset bit set, which tells the sending station that the frame was received but the server did not have the resources to process the connection request.
>
>This might show up as a delayed or slower connection. The client should attempt the connection again after waiting for a timeout (so you don't see an error) but this can slow the connection in certain types of systems.
>
>CAUSE
>A Winsock application accepts connections on a port by calling a Listen() function, which has a Backlog parameter specifying the maximum length of the pending-connection queue. The Winsock specification defines the maximum Listen() backlog at 5 and when this is exceeded, TCP/IP issues a Reset.
>
>RESOLUTION
>In Windows NT 3.1 Service Pack 3 the backlog limit has been increased from 5 to 60, Socket applications now can accept 60 simultaneous connection requests without issuing a reset.
>
>In Windows NT 3.5x the backlog limit has been increased to 100. In Windows NT Server version 4.0 the backlog limit has been increased to 200. In Windows NT Workstation version 4.0 the backlog limit has been kept at the Winsock specification of 5.
>
>NOTE: This fix applies only to the MAXIMUM allowed Listen() Backlog. Each Winsock application must request its own Listen() Backlog queue length.
>
>STATUS
>Microsoft has confirmed this to be a problem in Windows NT and Windows NT Advanced Server version 3.1. This problem has been corrected in the latest U.S. Service Pack for Windows NT and Windows NT Advanced Server version 3.1. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):
>
>
> S E R V P A C K
>
>REFERENCES
>The Winsock specification (available on ftp://ftp.microsoft.com/bussys/winsock), has more information about Winsock and the listen() function. See Visual C++ documentation as well.
>
>"Internetworking with TCP\IP" by Comer, has more information about TCP\IP connections.
>
>Additional query words: prodnt
>
>Keywords : kbnetwork
>Issue type :
>Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW310 kbWinNTSsearch kbWinNTS310 kbWinNTAdvSerSearch kbWinNTAdvSer310 kbWinNTS310search kbWinNT310Search kbWinNTW310Search
>
>
>Last Reviewed: October 25, 2000
>© 2001 Microsoft Corporation. All rights reserved. Terms of Use.
>
>*****************************************************************************
>
>Windows NT WinSock Listen (Backlog) Parameter Limit
>
>Q127144
>
>-----------------------------------------------------------------------------The information in this article applies to:
>
>Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
>Microsoft Windows NT Server versions 3.5, 3.51, 4.0
>-----------------------------------------------------------------------------
>
>The WinSock listen() call backlog parameter under Windows NT version 3.5 and 3.51 accepts a maximum value of 100.
>
>The maximum backlog parameter is 5 on Windows NT 4.0 Workstation, and 200 on Windows NT 4.0 Server.
>
>WinSock server applications use the listen() call to establish a socket for listening for incoming connections. This calls second parameter, backlog, is defined as the maximum length to which the queue of pending connections may grow.
>
>The WinSock version 1.1 specification states the maximum value for the backlog parameter is 5. However, Windows NT version 3.5 accepts up to 100 for this value.
>
>Services that handle a large number of socket connections may be written to use a larger backlog value to prevent client connection requests from being dropped. This can be useful when writing applications such as World Wide WEB (WWW) and gopher servers.
>Additional query words: prodnt
>
>Keywords : kbnetwork kbAPI kbSDKPlatform kbWinsock ntnetserv NTSrvWkst kbGrpNet
>Issue type :
>Technology :
>
>Last Reviewed: March 10, 2000
>© 2001 Microsoft Corporation. All rights reserved. Terms of Use.
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform