Steffen Jaeckel 7fbf507f58 Fix connected/connecting semantics
In case a connection is established, but the stream negotiation has not
completed yet, a user may think that they can start sending data,
but this is not the case.

All of the following quotes originate in RFC6120.

As of Ch. 8:

> After a client and a server (or two servers) have completed stream
> negotiation, either party can send XML stanzas.

As of Ch. 7.3.1:

> The parties to a stream MUST consider resource binding as
> mandatory-to-negotiate.

As of Ch. 6.3.1:

> The parties to a stream MUST consider SASL as mandatory-to-negotiate.

As of Ch. 4.3.5:

> The initiating entity MUST NOT attempt to send XML stanzas to entities
> other than itself (i.e., the client's connected resource or any other
> authenticated resource of the client's account) or the server to which
> it is connected until stream negotiation has been completed.
> Even if the initiating entity does attempt to do so, the receiving
> entity MUST NOT accept such stanzas and MUST close the stream with a
> <not-authorized/> stream error [...]

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-11-08 15:23:49 +01:00
2021-03-23 19:51:57 +02:00
2023-08-25 18:08:42 +02:00
2023-11-08 15:23:49 +01:00
2023-11-01 01:40:45 +01:00
2022-07-11 13:05:57 +02:00
2022-04-06 11:24:13 +02:00
2023-08-02 15:42:54 +02:00
2023-08-02 15:42:54 +02:00
2014-05-09 17:04:10 +02:00
2023-08-25 18:08:42 +02:00
2014-04-25 19:22:45 +02:00
2014-04-26 12:03:14 +02:00
2023-08-25 18:08:42 +02:00
2022-02-04 13:36:17 +01:00
2014-04-25 19:22:45 +02:00

libstrophe [![Build Status](https://github.com/strophe/libstrophe/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/strophe/libstrophe/actions/workflows/main.yml?query=branch%3Amaster+++)
==========

libstrophe is a lightweight XMPP client library written in C. It has
minimal dependencies and is configurable for various environments. It
runs well on Linux, Unix and Windows based platforms.

libstrophe is dual licensed under MIT or GPLv3.

Build Instructions
------------------

If you are building from a source control checkout, run:

    ./bootstrap.sh

to generate the `configure` script.

From the top-level directory, run the following commands:

    ./configure
    make

The public API is defined in `strophe.h` which is in the
top-level directory.

The `examples` directory contains some examples of how to
use the library; these may be helpful in addition to the
API documentation

To install on your system, as root (or using sudo):

    make install

Note, the default install path is `/usr/local/`, to specify
another path use the `--prefix` option during configure, e.g.:

    ./configure --prefix=/usr

### Android

Run script `build-android.sh` and follow the instructions. You will
need expat sources and android-ndk.

### Code Coverage

If you want to create a code coverage report, run:

    ./configure --enable-coverage
    make coverage

The coverage report can be found in `./coverage/index.html`.


Requirements
------------

libstrophe requires:

- expat or libxml2 - expat is the default; use `--with-libxml2` to
  switch
- openssl or GnuTLS on UNIX systems - openssl is default; use
  `--with-gnutls` to switch

To build libstrophe using autotools you will need `autoconf`,
`automake`, `libtool` and `pkg-config`.

To run code coverage analysis you will need `gcov` and `lcov`.

Installation
------------

libstrophe package has been added to popular Linux distributions,
BSD systems and OSX package managers.

Documentation
-------------

API documentation is inline with the code and conforms to Doxygen
standards. You can generate an HTML version of the API documentation
by running:

    doxygen

or if you have everything configured properly:

    make docs

Then open `docs/html/index.html`.

An online version of the documentation of the latest release is available on http://strophe.im/libstrophe/

Releases
--------

Releases are signed with the GPG key with ID `F8ADC1F9A68A7AFF0E2C89E4391A5EFC2D1709DE`.

It can be found e.g. on https://keys.openpgp.org/
Description
Languages
C 95.1%
M4 2.9%
Makefile 1.7%
Shell 0.3%