Home > slp-sharp

slp-sharp

Slp-sharp is a project mainly written in C# and SHELL, it's free.

C# Client library for OpenSLP service location

slp-sharp - (c) 2011 Ian Norton

About

slp-sharp is a simple wrapper around the client side service discovery parts of OpenSLP (http://openslp.org).

Using slp-sharp you can currently search for advertised services of a particular service type and also supply scopes.

Eg:

using System; using SlpSharp;

namespace slpsharptest { class MainClass { public static void Main (string[] args) { using ( var slp = new SlpClient( String.Empty ) ){ Console.WriteLine("SLP Opened");

    slp.Find( "inbtest:inb.http", new string[0],
      delegate ( string url, UInt16 lifetime ){
    // found a service
        Console.WriteLine("found {0}, lifetime = {1}", url, lifetime );
      } );

  }
  Console.WriteLine("SLP Closed");

}

} }

Supported OpenSLP Platforms

So far I have tested the following configurations with slp-sharp with no adverse results (your own mileage may vary).

Linux x86 OpenSLP 1.x ( ubuntu 10.10 package ) Linux x86 OpenSLP 2.0 Beta 1 ( compiled from source ) Linux x86 OpenSLP 2.0 Beta 2 ( compiled from source ) Linux x64 OpenSLP 1.x ( debian squeeze package ) Linux x64 OpenSLP 2.0 Beta 1 ( compiled from source ) Windows XP x86 OpenSLP 2.0 Beta 1 ( compiled from source ) Windows XP x86 OpenSLP 2.0 Beta 2 ( compiled from source )

I have experienced crashes when using the pre-built slp.dll from the openslp_2.0.0_beta1_x86.msi package from openslp.org but have had no problems after building from sources.

BSD License

Copyright (c) 2011, Ian Norton All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.  

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

* Neither the name of slp-sharp nor the names of its contributors may be 
  used to endorse or promote products derived from this software without
  specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Previous:testProject