private void button1_Click(object sender, EventArgs e) { subscribeEvent(); var request = new Rpc.Event.Protocol.Request() { value = ++number }; try { client.Execute(request.toByteArray()); } catch (RpcException ex) { if (RpcError.RPC_S_SERVER_UNAVAILABLE == ex.RpcError || RpcError.RPC_S_SERVER_TOO_BUSY == ex.RpcError) { textBox1.AppendText(String.Format("RPC Server Unavailable, Error={0}\r\n", ex)); } else { throw; } } }