Home > Back-end >  O xmlsocket server security policy communication protocol
O xmlsocket server security policy communication protocol

Time:10-05

O xmlsocket server security policy communication protocol of the c language to write on Linux can use additional
thanks a lotThe public function connect (_arg1: String, _arg2: int, _arg3: Boolean) : void {
This. The host=_arg1;
This. The port=_arg2;
If (_arg3) {
Enclosing the Debug info ((((" the host connected IP: "+ this. The host) +" port: ") + enclosing port));
Security. LoadPolicyFile (" xmlsocket://127.0.0.1:1841 ");
This. Socket. Connect (enclosing the host, _arg2);
} else {
Security. LoadPolicyFile (" xmlsocket://media.xxx.com: 843 ");
Enclosing the Debug info ((" connect server IP: "+ this. The host));
This. Socket. Connect (enclosing the host, _arg2);
};
}
Public function write (_arg1: IMsgHead _arg2: IMsgBody) : void {
Var _local3: ByteArray containing=new ByteArray containing ();
_arg1. Encode (_local3);
_arg2. Encode (_local3);
Var _local4: int=_local3. Length;
_local3 [1]=((_local4 & lt; <16) & gt;> 24);
_local3 [2]=((_local4 & lt; <24) & gt;> 24);
Byte2Hex. Trace (_local3);
This. Socket. WriteBytes (_local3);
This. Socket. Flush ();
}
The public function onConnectSecurityError (_arg1: SecurityErrorEvent) : void {
Enclosing the Debug info ((" failed to get server authentication crossdomian: "+ _arg1. ErrorID));
If (this. IsLive) {
Security. LoadPolicyFile (" xmlsocket://127.0.0.1:1841 ");
} else {
Security. LoadPolicyFile (" xmlsocket://media.xxx.com: 8000 ");
  • Related