The part of NetWorking
com.ndsl.nw.bun133.Json is Json Class
Use Example:
Json.build("{\"a\":10}")
The Source made Json with "a":10
You can also getValue or Key
Json.getContent("field_name")
It returns JsonContent.
Json is made of JsonContents. JsonContent is "a":1 or "a":"a" ...and so on.
Cilent is NetworkBase Server is NetworkServerBase
Most part of these is same.
send(Object)
It'l Send Object We supported Integer,String,Json... ###getData
getData()
getData returns byte array,but you can use sockIn.readUTF() for String,sockIn.readInteger for Integer...
if(isJson){
getJson()
}
isJson returns available data is Json and getJson return Json.
ping()
It will return ping ms as long.
pingWithJson()
It will return ping and Json.build ms as long.