Flex BlazeDS CommandMessage用法

 flex.messaging.messages.CommandMessage c = new
 flex.messaging.messages.CommandMessage();
             c.setOperation(CommandMessage.LOGIN_OPERATION);
             String credString = "admin:admin";
             flex.messaging.util.Base64.Encoder encoder = new
 flex.messaging.util.Base64.Encoder(credString.length());
             encoder.encode(credString.getBytes());
             c.setBody(encoder.drain());
             c.setDestination("auth");
             AMFConnection amfConnection = new AMFConnection();
             String url = "http://prodigy/flexapp/messagebroker/amf";;
             try{amfConnection.connect(url);
             }
             catch (ClientStatusException cse){
                 cse.printStackTrace();
             }
             Object loginResult = amfConnection.call(null, c);

你可能感兴趣的:(C++,c,Flex,C#)