Results 1 to 3 of 3

Thread: IP Transport slow to receive client connection?

  1. #1
    Join Date
    May 2001
    Posts
    697

    Default IP Transport slow to receive client connection?

    Code:
    function iruleTCPserver(p1,p2)
        if ( p2 == transport.constants.event.CONNECTIONCLOSED ) then
            print("#1 response PROBABLY WILL NOT HAPPEN...")
            return
        end
        if ( p2 == transport.constants.event.NEWCONNECTION ) then
            print("New iRule Connection.")
            iruleTCPclients[p1]=true
            gir.TriggerEvent("irule_send", 100, 0)
            
            p1:Callback(transport.constants.parser.TERMINATED,'\n', 1000, function (cp1,cp2)
            if cp1 then
                gir.TriggerEvent(string.trim(cp1), 100, 0)    --was 100
                print (cp1) 
            end
                if ( cp2 == transport.constants.event.CONNECTIONCLOSED ) then
                    print("#2 response PROBABLY WILL NOT HAPPEN...")
                    p1:Close()
                    iruleTCPclients[p1]=nil
                    return
                    
                end
                
            end)
            return
        end
        
    end
    if ( iruleTCPclients ) then
        for c,v in pairs(iruleTCPclients ) do
            c:Close()
        end
    end
    if ( irulec5 ) then
        irulec5:Close()
    end
    iruleTCPclients = {}
    iruleLISTENER = transport.New(transport.constants.transport.GIPLISTEN)
    if not iruleLISTENER:Open(nil, 9999) then
        print("Could not create iRule TCP server.")
        iruleLISTENER:Close();
        iruleLISTENER = nil;
    end
    iruleLISTENER:Callback(transport.constants.parser.TERMINATED, '\r\n', 2000, iruleTCPserver)
    print("Starting iRule TCP Server...")
    I have two instances of girder running this and accepting client connections to send events problem is it is slow to accept connection not sure why. It is taking two to three attempts for the iRule client to get a connection.

    Any ideas to trouble shoot and determine how I can see what is the cause. Once connected it works ok but also getting delays on occassion or a backlog of events.

    Thanks
    Last edited by rickd; April 29th, 2012 at 10:13 PM.
    Rickd

  2. #2
    Join Date
    Oct 2005
    Posts
    307

    Default

    Are you sure iRule is sending the \r\n terminator?

  3. #3
    Join Date
    May 2001
    Posts
    697

    Default

    yes it was a network issue in my router solved thanks
    Rickd

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •