Deteksi Server Lokal
Server lokal diharuskan mampu menyediakan informasi dasar untuk dapat di kenali oleh aplikasi iPusnas dengan ketentuan membuat sebuah service UDP dengan ketentuan sebagai berikut :
DISCOVERY_REPLY = "iPUSNAS_LOCAL_SERVER"
DISCOVERY_REQUEST = "FOUND_iPUSNAS_LOCAL_SERVER"
PORT = 9002
HOST = 255.255.255.255
dimana akan memberikan reply data berupa JSON yang di awali dengan DISCOVERY_REQUEST
dan dilanjutkan dengan struktur data sebagai berikut:
{
"meta": {
"code": 200,
"confirm": "Succes"
},
"data": {
"id": "1",
"name": "iPusnas Local Content Management",
"link": "https://ipusnas.id",
"sn": "4C4C4544-004B-3210-8054-C8C04F5A4C32",
"base_url" : "http://local.ipusnas.id/apis",
"static_url" : "http://local.ipusnas.id/static",
"client_id" : {
"android" : "EieoeZuyivjYgxrDKeVp",
"desktop" : "EieoeZuyivjYgxrDKeVp",
"ios" : "EieoeZuyivjYgxrDKeVp"
},
"client_secret" : {
"android" : "fbznwxkameuexot9nc4rlw3ix7xcepp0jh3nz8pe",
"desktop" : "fbznwxkameuexot9nc4rlw3ix7xcepp0jh3nz8pe",
"ios" : "fbznwxkameuexot9nc4rlw3ix7xcepp0jh3nz8pe"
}
}
}