twisted.internet

    1熱度

    2回答

    我正在建立一個TCP/IP協議的套接字,並且由於我的接收器正在處理int8u_t我想知道這種方法是否正確。 在連接服務器有一個值mode=int(42)發送到在def connectionMade(self)完成的接收器。但我知道會有一些衝突,因爲在Python中的正常int是32位,我的接收器只有8位,我可以以某種方式投它或在int8u創建它? from twisted.internet.pro

    1熱度

    1回答

    嘗試構建將在多個端口上接收消息的扭曲應用程序。端口應該生成Alert對象,其中包括tag屬性和trigger屬性。然後應用程序應該檢查是否已經有該標籤的AlertJob。如果有的話,應該將Alert排入AlertJob,如果沒有,應該先創建新的AlertJob。 AlertJob的工作是定期檢查觸發器是否符合觸發條件,再次通知主應用程序。這裏是我的問題: 如何將自定義類(AlertJob)掛接到扭

    1熱度

    1回答

    錯誤無模塊TCP4 ....發現。 在Windows和Ubuntu 10.04上。 我需要安裝任何新的東西。 我試圖將endpoints.py複製到一個目錄。但不起作用

    2熱度

    2回答

    我寫了一個簡單的扭曲的服務器 - from twisted.internet import reactor from twisted.internet import protocol from twisted.web import server, resource from twisted.internet import reactor class Index(resource.Reso

    2熱度

    1回答

    基於this example,我正在實施基於Twisted的心跳客戶端/服務器組合。這是我第一個Twisted項目。 基本上它由UDP偵聽器(Receiver)組成,他在接收包上調用偵聽器方法(DetectorService.update)。 DetectorService始終保存着當前活動/非活動客戶端的列表(我擴展了很多示例,但內核仍然相同),使得對於在指定超時時間內看起來斷開連接的客戶端作出

    2熱度

    1回答

    我的代碼如下所示: ... # class Site(Resource) def render_POST(self,request) otherclass.doAssync(request.args) print '1' return "done" #that returns the HTTP response, always the same. ... d

    3熱度

    1回答

    當我嘗試通過`twisted.internet.reactor.spawnProcess'運行python腳本: from twisted.internet import protocol, reactor class ProcessProtocol(protocol.ProcessProtocol): def connectionMade(self): self.tra

    2熱度

    1回答

    我試圖計算的扭曲活動協議的數量,但我得到了一個錯誤: exceptions.AttributeError: Factory instance has no attribute 'numProtocols' 下面是代碼: class EchoPro(Protocol): def connectionMade(self): self.factory.numProtocols

    1熱度

    1回答

    我設計我在哪裏使用雙絞線它與SSL SSL服務器,它需要客戶端證書認證,繼續該計劃,當我驗證客戶端的SSL證書,則返回true,但我想通過commanname和EMAILADDRESS的客戶證書中,這樣我可以得到在處理程序類特定的客戶端設置,使你能幫助我嗎? from OpenSSL import SSL from twisted.internet import ssl, reactor fr