AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Server keeps saying hi
 
 

Hi
I wrote my own version of the Client() function, to use a library called CSockets and have it all working, except for the server continually saying hi to me in the middle of a conversation.

It seems to think I have gone away for some time and returned and yet my reponses were made within a few seconds of each other.

Does anyone know what I need to do to fix this? Do I need to send some kind of timing information to the server?

 

 
  [ # 1 ]

It sounds to me (and this is only a guess, mind you) that the client app is constantly sending out data to a persistent connection. If this is the case, then you could, conceivably get the symptoms you describe. What should happen is that when the client software starts, a “handshake” connection is made, a response received, and the connection then closed. Then when the user types in something, a new connection is made, the input is sent, a reply received, and the connection is closed. This order of events (grossly over-simplified, of course!) repeats for each input the user makes. A persistent connection is generally not a good idea for this sort of exchange. smile

 

 
  [ # 2 ]

Thanks for replying Dave. I set up some debugging functions, and it looks like I have made a mistake somewhere in my threading routine.

 

 
  [ # 3 ]

I’ve done only a little bit of application programming, the vast majority of it in Visual Basic (PHP is my language of choice), so I’m not certain how helpful I might be, if at all. However, I’ll see what I can do, if you like. smile

 

 
  [ # 4 ]

Sometimes I get a valid string to send to the server and sometimes it has been cleared, for no reason I can think of and when I step through with the debugger, it works perfectly. So all I can do at this point, is keep setting break points until I find it.

It is definately not a problem with ChatScript or CSimpleSockets, beause when the server is sent a valid message, it works correctly.

 

 
  [ # 5 ]

It is definitely a threading issue.

 

 
  login or register to react