Add more connection callbacks and a connected variable to represent connection status.
Add more connection callbacks and a connected variable to represent connection status.

CryptArc/gateway,darkwallet/gateway,jorik041/gateway,eXcomm/gateway,darkwallet/gateway,jorik041/gateway,eXcomm/gateway,eXcomm/gateway,jorik041/gateway,CryptArc/gateway,darkwallet/gateway,CryptArc/gateway