欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Twisted
来自开放百科 - 灰狐
Twisted is an event-driven networking framework written in Python and licensed under the MIT license.
Guide
http://twistedmatrix.com/trac/wiki/Downloads >>> from twisted.web.client import getPage >>> from twisted.internet import reactor >>> def printContents(contents): print "The Deferred has called printContents with the following contents:" print contents reactor.stop() >>> deferred = getPage('http://www.huihoo.com/') >>> deferred.addCallback(printContents) <Deferred at 0xb9afd0> >>> reactor.run()
Writing a TCP server
Server: 192.168.1.3 , Debian 3.1
Writing a TCP client
Client: 192.168.1.2 , WinXP
分享您的观点