Should only be mapped when the getdata is done.

Without this change, mappings will be created even after AlreadyHave equals true, and will never be erased.
Use asynchronous I/O to handle RPC requests

This allows more flexibility in the RPC code, e.g. making it easier to
handle multiple simultaneous connections later on.

Currently asynchronous I/O is only used to listen for and accept
incoming connections.  Asynchronous reading/writing is more involved.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Add dual IPv4/IPv6 stack support to the RPC server

The RPC server now listens for, and handles, incoming connections on
both IPv4 as well as IPv6.

If available (and usable) it uses a dual IPv4/IPv6 socket on systems
that support it (e.g. Linux and BSDs) and falls back to separate
IPv4/IPv6 sockets on systems that don't (e.g. Windows).

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Allow clients on the IPv6 loopback as well

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Generalise RPC connection handling code to allow more listening sockets

Using this modification it should be relatively easy to, at a later
time, listen on multiple addresses (even Unix domain sockets should be
possible).

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Allow all addresses on the loopback subnet (127.0.0.0/8) not just 127.0.0.1

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Use the QueueShutdown signal to stop accepting new RPC connections

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Merge branch 'master' into async-ipv6-rpc

Conflicts:
	src/bitcoinrpc.cpp

Signed-off-by: Giel van Schijndel <me@mortis.eu>
*Always* send a shutdown signal to enable custom shutdown actions

NOTE: This is required to be sure that we can properly shut down the RPC
      thread.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Quieten 'getdata' P2P message output

Output one message per getdata, not one message per 'inv' entry.
Merge branch 'master' into async-ipv6-rpc
Cancel outstanding listen ops for RPC when shutting down

Use Boost's signal2 slot tracking mechanism to cancel any (still open)
listening sockets when receiving a shutdown signal.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
On Windows link with `mswsock`, it being required (indirectly) by RPC code

Signed-off-by: Giel van Schijndel <me@mortis.eu>
small updates to Bitcoin-Qt project file

- add noui.cpp to SOURCES (to see / edit the file)
- re-word a comment and remove a space
Update contrib/debian and remove system json_spirit patch.

That patch has been broken for a long, long time (forever?) and
doesn't make sense.
Merge pull request #1520 from TheBlueMatt/debian

Update contrib/debian and remove system json_spirit patch.
GUI: change language selection format

- display as "language - country (locale name)", when locale name consists of 2 parts
- display as "language (locale name)", when locale name consists of 1 part
Merge pull request #1516 from Diapolo/GUI_projectfile

small updates to Bitcoin-Qt project file
Merge pull request #1519 from Diapolo/GUI_locale_selection

GUI: change language selection format to "language - country (locale name)"
Stop processing messages on full send buffer and dont disconnect.

Also decrease default send/receive buffer sizes from 10 to 5 mb
as this patch makes it easy for a node to fill both instead of
only send.