Consultor Eletrônico



Kbase P73291: Using sockets to receive XML file from external machine, only first packet of data is received
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/02/2009
Status: Verified

SYMPTOM(s):

Using sockets to receive XML file from external machine

Only first packet of data is received

Server is sending more data, client simply ignores it

FACT(s) (Environment):

Progress 9.1x
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

CAUSE:

The source program was incorrectly doing a WAIT-FOR READ-RESPONSE of SomeSocket. This caused the program to terminate the WAIT-FOR after the first packet of data arrived on the socket. The program then disconnected from the socket.

FIX:

Modify the source program to do a WAIT-FOR CLOSE OF THIS-PROCEDURE and in the internal procedure that is being called from the READ-RESPONSE event check to see if SELF:CONNECTED returns FALSE. If it does return FALSE, do an APPLY "CLOSE" TO THIS-PROCEDURE followed by a RETURN statement.