pararestful
v1.0.15
Published
a resful from parasocket
Downloads
3
Readme
paraRestful
add server
step 1 add server
- ParaRestFull_1.ParaRestFull.addServer("ParaRestFull", ParaRestFull_1.EnumRestFullType.ip_local, 9999);
step 2 add server handler
- ParaRestFull_1.ParaRestFull.add_RPC_server_function("ParaRestFull", (cn, paraid, buff) => {return buffer;});
add client listener
step 1 add client ParaRestFull.addClient("user1",123,"127.0.0.1",9999);
step 2 add client handler ParaRestFull.add_RPC_client_funtion("user2",(cn,paraid,buff)=>{return buffer});
send msg 2 server
step 1 add client
- ParaRestFull.addClient("user2",123,"127.0.0.1",9999);
step 2 send msg 2 server and get buffer return
- var returnbuff= await ParaRestFull.msgC2S("user1",123,buffer,1);
send msg 2 client
step 1 add client
- ParaRestFull.addClient("user2",123,"127.0.0.1",9999);
step 2 send msg 2 client and get buffer return
- var returnbuff= await ParaRestFull.msgC2C("user2",124,buffer,1);