Beispiel #1
0
    public static void Main(string [] args)
    {
        if (args.Length > 0)
        {
            url = args[0];
        }

        Console.Write("#\n# Request\n#\n# {0}\n#\n", EFTL.GetVersion());

        Hashtable options = new Hashtable();

        if (username != null)
        {
            options.Add(EFTL.PROPERTY_USERNAME, username);
        }

        if (password != null)
        {
            options.Add(EFTL.PROPERTY_PASSWORD, password);
        }

        try
        {
            // Asynchronously connect to the server.
            EFTL.Connect(url, options, new ConnectionListener());
        }
        catch (Exception e)
        {
            Console.WriteLine(e.ToString());
        }
    }
Beispiel #2
0
    public KVRemove(String url, String username, String password)
    {
        Hashtable options = new Hashtable();

        if (username != null)
        {
            options.Add(EFTL.PROPERTY_USERNAME, username);
        }
        if (password != null)
        {
            options.Add(EFTL.PROPERTY_PASSWORD, password);
        }

        // Asynchronously connect to the eFTL server.
        EFTL.Connect(url, options, new ConnectionListener());
    }
Beispiel #3
0
    public Subscriber(String url, String username, String password)
    {
        if (username != null)
        {
            options.Add(EFTL.PROPERTY_USERNAME, username);
        }

        if (password != null)
        {
            options.Add(EFTL.PROPERTY_PASSWORD, password);
        }

        // Asynchronously connect to the eFTL server.
        EFTL.Connect(url, options, new ConnectionListener());

        try {
            latch.Wait();
        } catch (Exception) {}
    }
    public Publisher(String url, String username, String password)
    {
        if (username != null)
        {
            options.Add(EFTL.PROPERTY_USERNAME, username);
        }

        if (password != null)
        {
            options.Add(EFTL.PROPERTY_PASSWORD, password);
        }

        // Asynchronously connect to the eFTL server.
        EFTL.Connect(url, options, new ConnectionListener());

        try {
            latch.Wait();
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
        }
    }