# Module OBus_server

    module OBus_server: sig .. end

Servers for one-to-one communication

    type t

Type of a server

    val addresses : t -> OBus_address.t list

`addresses server` returns all the addresses the server is listenning on. These addresses must be passed to clients so they can connect to `server`.

    val shutdown : t -> unit Lwt.t

`shutdown server` shutdowns the given server. It terminates when all listeners (a server may listen on several addresses) have exited. If the server has already been shutdown, it does nothing.

    val make : ?switch:Lwt_switch.t ->
           ?capabilities:OBus_auth.capability list ->
           ?mechanisms:OBus_auth.Server.mechanism list ->
           ?addresses:OBus_address.t list ->
           ?allow_anonymous:bool ->
           (t -> OBus_connection.t -> unit) -> t Lwt.t

`make ?switch ?capabilities ?mechanisms ?addresses ?allow_anonymous f` Creates a server which will listen on all of the given addresses.
`capabilities` : is the list of supported capabilities, it defaults to `OBus_auth.capabilities`
`mechanisms` : is the list of authentication mechanisms supported by the server,
`addresses` : default to `{ name = "unix"; args = [("tmpdir", "/tmp")]`,
`allow_anonymous` : tell whether clients using anonymous authentication will be accepted. It defaults to `false`,

    val make_lowlevel : ?switch:Lwt_switch.t ->
           ?capabilities:OBus_auth.capability list ->
           ?mechanisms:OBus_auth.Server.mechanism list ->
           ?addresses:OBus_address.t list ->
           ?allow_anonymous:bool ->
           (t -> OBus_transport.t -> unit) -> t Lwt.t

`make_lowlevel` is the same as `OBus_server.make` except that `f` receives only the transport, and no connection is created for this transport.