Socket Disconnect issue (re-post)

Posted by sam on 17-Jul-2013 01:49

OE 10.2B
Windows Client on Citrix.



OE client opens a socket connection with java client to exchange data.
data gets exchanged as and when certain events happen on Java app.
ocassionally, the socket port at OE client side seems to get disconnected and the data exchange fails.


is there a way to trap socket 'disconnect ' event in OE. if not, what can I try to find out at what point the port is getting disconnected or what is causing this issue.
in our case, oe socket port waits for data , once received does some processing and waits for the next set of data.


All Replies

Posted by Richard.Kelters on 19-Jul-2013 15:30

According to the help: The SET-READ-RESPONSE-PROCEDURE( ) method is used to name the READ-RESPONSE event procedure and to associate it with a socket object. The  AVM invokes this procedure whenever it detects that data is available on the  socket or that the remote end of the socket has closed its end of the socket.

I've put this comment in my code:

    iLength# = hSocket#:GET-BYTES-AVAILABLE().
    /* if iLength# eq 0 then the READ method hangs! */
    IF iLength# GT 0

Seems a logical comment when reading the help, hope this helps you trap the disconnect.


This thread is closed