
			** xbmstreamd **

0. INTRODUCTION

xbmstreamd is both an XBMSP fileserver, and a caching XBMSP proxy.
The proxy does "XBox Media Streaming Protocol WAN optimization".

The XBMSP protocol implementation in current versions of XBMC is
strictly synchronous. This means that the client code opens a file,
then asks for a datapacket, waits for the reply, asks for the next
packets, etcetera. The result is that the bandwidth is limited by
the round-trip-time between XBMC and the server - there is a limit
to the number of packets per second.

The result is that if you use a remote (as in, not on the local lan)
XBMSP server, bandwidth is limited, and higher resolution files that
play just fine locally will start to "stutter".

xbmstreamd in caching proxy mode will detect if a file is being
streamed from the remote XBMSP server, and start asynchronous
read-ahead.

This thoroughly upsets the standard ccxstream server code. Because
of that, xbmstreamd is not just a proxy, it can serve files as well,
so that you can use it as a replacement for ccxstreamd on the server.

Another thing that the proxy code does is connection caching. The
XBMC code likes to re-connect to the server a *lot* and that can
upset firewalls and nat devices. Connection caching fixes this.


1. COMPILING

You can compile xbmstreamd with or without pthread support.
Pthread support is needed for the connection caching feature.
You can enable/disable pthread support in the Makefile.

Compiling is done by typing "make", or, on systems where GNU make
is not standard (BSD/Solaris), by typing "gmake".

2. INSTALLING

Copy xbmstreamd to a suitable location like /usr/local/sbin

3. RUNNING

Try "xbmstreamd -h" for instructions.

Examples:

  - as a server, run on non-standard port 1401:

    xbmstreamd -d /usr/local/data -p 1401

  - as a proxy, auto-discoverable on LAN, cache size 4MB,
    connect to remote server on non-standard port 1401:

    xbmstreamd -a -c 4000000 -h remoteserver:1401


