static public void getBalance() { ProtocolMessage.setWaitFor(ProtocolMessageCode.balance2); // Return the balance for the matching address using (MemoryStream mw = new MemoryStream()) { using (BinaryWriter writer = new BinaryWriter(mw)) { writer.WriteIxiVarInt(IxianHandler.getWalletStorage().getPrimaryAddress().Length); writer.Write(IxianHandler.getWalletStorage().getPrimaryAddress()); NetworkClientManager.broadcastData(new char[] { 'M', 'H' }, ProtocolMessageCode.getBalance2, mw.ToArray(), null); } } ProtocolMessage.wait(30); }