| jsonrpcbase. ¿î¼Û °èÃþÀ̾ø´Â °£´ÜÇÑ JSON-RPC ¼ºñ½º |
Áö±Ý ´Ù¿î·Îµå |
jsonrpcbase. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- MIT/X Consortium Lic...
- °Ô½ÃÀÚ À̸§:
- Randy Syring
jsonrpcbase. ű×
jsonrpcbase. ¼³¸í
JSONRPCBASE´Â Python ¶óÀ̺귯¸®°¡ º¹ÀâÇÑ Æ¯¼ö ¿ä±¸ »çÇ×À̾ø´Â Àü¼Û ÇÁ·ÎÅäÄÝ°ú °°Àº UNIX / TCP ¼ÒÄÏ°ú °°Àº JSON-RPC ¼ºñ½º¸¦ ½±°Ô ±¸ÇöÇÒ ¼öÀÖ´Â º¸Á¶ ¶óÀ̺귯¸®ÀÔ´Ï´Ù. ÀÌ ¶óÀ̺귯¸®·Î ÀûÇÕÇÑ Àü¼Û ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÏ¿© ½ÇÁ¦·Î json-rpc service.exampleexample »ç¿ëÀ» Á¦°øÇؾßÇÕ´Ï´Ù. jsonrpcbasechat_service = jsonrpcbase.jsonrpcservice () def ·Î±×ÀÎ (username, password, timelimit = 0) : (...) µ¹¾Æ °¡±â truedef celect_message (** kwargs) : (...) ¹Ýȯ chat_messagefef send_message (msg) : (...) If __name__ == '__main__': # ¸Þ¼Òµå ·Î±×ÀÎÀ» '·Î±×ÀÎ'À¸·Î Ãß°¡ÇÕ´Ï´Ù. chat_service.add (login, types = ) # receled_message ¸Þ¼Òµå¸¦ 'recv_msg'·Î ¼ºñ½º¿¡ Ãß°¡ÇÕ´Ï´Ù. chat_service.add (clection_message, name = 'receuv_msg', types = { "msg": basestring, "id": int}) # send_message ¸Þ¼Òµå¸¦ 'send_msg'·Î 'send_msg'·Î Ãß°¡ÇÕ´Ï´Ù. chat_service.add (send_message, 'send_msg') (...) # json-rpc È£ÃâÀ»¹Þ½À´Ï´Ù. jsonmsg = my_socket.recv () # json-rpc È£ÃâÀ» ó¸®ÇÕ´Ï´Ù. °á°ú = CHAT_SERVICE.CALL (JSONMSG) # ´Ù½Ã °á°ú¸¦ º¸³À´Ï´Ù. my_socket.send (°á°ú) Áú¹® ¹× ÀÇ°ß È®ÀÎ : http://groups.google.com/group/blazelibsproducts ȨÆäÀÌÁö
jsonrpcbase. °ü·Ã ¼ÒÇÁÆ®¿þ¾î