Help with CGATE sockets

Discussion in 'C-Bus Toolkit and C-Gate Software' started by phcjpp, Sep 4, 2006.

  1. phcjpp

    phcjpp

    Joined:
    Oct 19, 2004
    Messages:
    112
    Likes Received:
    0
    Location:
    London
    Hi,

    I have my application connecting fine to cgate and running nicely but occasionally the cgate response messages are getting garbled. Usually this is caused by a getstate 254 or a dbgetxml - i.e something that causes cgate to send back a lot of data in a short space of time.

    I understand that my app needs to be fast enough to deal with what is sent back but I think cgate could lend a hand ! Interestingly, the socket is never dropped so it suggests cgate thinks everthing is fine. Is there anyway to slow cgate down to give my app a chance. Its running on a 3gz pc with not a lot else running.

    Any other ideas ?

    Chris
     
    phcjpp, Sep 4, 2006
    #1
  2. phcjpp

    Duncan

    Joined:
    Jul 23, 2004
    Messages:
    925
    Likes Received:
    0
    Location:
    Salinas de Garci Mendoza, Bolivia
    No, I dont know of any way of slowing CGate down..

    What Development Tools are you using to build your application? Have you tried the support groups or forums for those tools? CGate is a very standard socket based application.. if you're having trouble keeping up with it and things are getting garbled then there's something fundamentally wrong with the what you're doing in your software..
     
    Duncan, Sep 4, 2006
    #2
  3. phcjpp

    phcjpp

    Joined:
    Oct 19, 2004
    Messages:
    112
    Likes Received:
    0
    Location:
    London
    Hi,

    Unfortunately I am having to write in vb6 eeeeuck! I have no probs with apps not being able to keep up with stuff being sent to them over sockets - happens all the time. Normally, though, you get a socket disconnect not a data drop. Its up to cgate how it handles these occurances though. The apps we have at work (java) kick you off - this way you know there is an issue right away and something can be done. Cgate is probably doing something though as me taking too long will cause the socket to block and potentially take down cgate.


    Chris
     
    phcjpp, Sep 4, 2006
    #3
  4. phcjpp

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Are you able to change the way you handle the messages from C-Gate ? For example, could you quickly read them into a queue so that you don't get a backlog of unread commands, and then process the received commands in the queue in slow-time ?
     
    Darren, Sep 4, 2006
    #4
  5. phcjpp

    phcjpp

    Joined:
    Oct 19, 2004
    Messages:
    112
    Likes Received:
    0
    Location:
    London
    I already do that - still get the occasional weird one. VB is unfortunately single threaded too so no help from threaded readers. I will persivere though!

    Chris
     
    phcjpp, Sep 4, 2006
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.