lib/spider-gazelle/signaller.rb
def process_request(data, client)
            validated = @validated.include?(client)
            parser = @validating[client.object_id]

            if validated
                parser.process data
            else
                result = parser.signal(data)

                case result
                when :validated
                    @validated.each do |old|
                        old.write "\x02update\x03"
                    end
                    @validated << client
                    if @validated.length > 1
                        client.write "\x02wait\x03"
                    else
                        client.write "\x02ready\x03"
                    end
                    @logger.verbose { "Client <0x#{client.object_id.to_s(16)}> connection was validated" }
                when :close_connection
                    client.close
                    @logger.warn "Client <0x#{client.object_id.to_s(16)}> connection was closed due to bad credentials"
                end
            end
        end
def process_request(data, client)
            validated = @validated.include?(client)
            parser = @validating[client.object_id]

            if validated
                parser.process data
            else
                result = parser.signal(data)

                case result
                when :validated
                    @validated.each do |old|
                        old.write "\x02update\x03"
                    end
                    @validated << client
                    if @validated.length > 1
                        client.write "\x02wait\x03"
                    else
                        client.write "\x02ready\x03"
                    end
                    @logger.verbose { "Client <0x#{client.object_id.to_s(16)}> connection was validated" }
                when :close_connection
                    client.close
                    @logger.warn "Client <0x#{client.object_id.to_s(16)}> connection was closed due to bad credentials"
                end
            end
        end
The server processes requests here