83869ffb5052bc6fcb72cd4068e385a784df9c5e
[motion.git] / server / config / rpc / client.js
1 var _0x2ef0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x72\x65\x73\x75\x6C\x74","\x72\x65\x71\x75\x65\x73\x74"];_0x2ef0[0];var jayson=require(_0x2ef0[1]);var Promise=require(_0x2ef0[2]);var client=jayson[_0x2ef0[4]][_0x2ef0[3]]({port:9001});module[_0x2ef0[5]]= {request:function(_0x547cx4,_0x547cx5){return  new Promise(function(_0x547cx6,_0x547cx7){client[_0x2ef0[8]](_0x547cx4,_0x547cx5,function(_0x547cx8,_0x547cx9){if(_0x547cx8){_0x547cx7(_0x547cx8)}else {if(_0x547cx9[_0x2ef0[6]]){_0x547cx7(_0x547cx9[_0x2ef0[6]])}else {_0x547cx6(_0x547cx9[_0x2ef0[7]])}}})})}}