Author | Topic: Socket question | |
---|---|---|
Clyde Annach | Socket question on Fri, 21 Dec 2001 16:51:27 -0500 We have developed an app that utilizes a client program running on the work station. This Client program sends messages via TCP/IP to a server program running on another PC. After an undetermined number of work stations have successfully communicated with the server program, the Server program stop seeing the messages from the work stations. Once you shut down and re-start the server program, the messages are once again recognized. We had been using another TCP/IP library and it would eventually give us a "buffer full" message. I am of the opinion that we are filling a buffer and not getting a message back with the Alaska stuff. Is there a way to clear this buffer or something/anything I may have failed to set properly. Any and all ideas, suggestions and information would be appreciated. Unfortunately, this problem comes as I leave for a vacation. I look forward to your suggestions on my return. Thanks again -- Clyde Annach Senior Programmer Analyst Professional Teledata, Inc. Manchester, NH 03101 email clyde@proteledata.com | |
boris@SQLExpress.net | Re: Socket question on Sat, 22 Dec 2001 00:03:42 +0100 clyde@proteledata.com (Clyde Annach) wrote in <3c23adfe@asgcom.alaska-software.com>: >We had been using another TCP/IP library and it would eventually give us >a "buffer full" message. I am of the opinion that we are filling a >buffer and not getting a message back with the Alaska stuff. > >Is there a way to clear this buffer or something/anything I may have >failed to set properly. Perhaps you are using the MSG_PEEK flag instead of MSG_NORMAL when reading from the socket. Best regards, Boris Borzic http://www.SQLExpress.net industrial strength C/S development tool | |
Clyde Annach | Re: Socket question on Thu, 27 Dec 2001 09:58:36 -0500 Hi Boris, > > Perhaps you are using the MSG_PEEK flag instead of MSG_NORMAL when reading > from the socket. I haven't specified this parameter. I will try explicitly assigning it a value of MSG_NORMAL. Thanks again Clyde | |
Clyde Annach | Re: Socket question - Solved on Wed, 02 Jan 2002 15:30:22 -0500 Hi all, I wasn't closing the socket being created by the SocketAccept function. Eventually I would run out of ID's. I will try to explain in more detail, correct me if I am wrong about any of this. When you create a socket, you get a socket ID. This socket is the "Server Socket" When you Accept a socket another ID is generated which is used for that connection. It was this type of ID I was running out of . Thanks again Clyde | |
phil@idep.org.uk | Re: Socket question - Solved on Thu, 03 Jan 2002 09:02:02 +0000 >I wasn't closing the socket being created by the SocketAccept function. >Eventually I would run out of ID's. Thanks for posting your solution. It looks like a simple trap to fall into, and so might catch more than a few unwary souls. Regards, Phil Ide Xbase++ FAQ current release: 5, Thursday 4th October 2001, 09:00am *** * Xbase++ FAQ: * online : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm * : www.software-braun.de/xbfaq/xbfaq.htm * download: http://www.idep.org.uk/xbase/xbfaq.zip * : www.software-braun.de/xbfaq/xbfaq.zip *** Smith and Wesson - the original point and click interface. |