2013-06-22 25 views
1

好了,所以我創建了使用各種教程的WebSocket的服務器,例如:在Dart類'_WebSocketImpl'中導致錯誤的原因是沒有實例方法'send'?

http://japhr.blogspot.co.uk/2012/12/dart-client-and-server-websockets.html http://www.dartlang.org/docs/dart-up-and-running/contents/ch05.html

然而,當我運行服務器端的代碼,並嘗試將數據發送到客戶談到了

Class '_WebSocketImpl' has no instance method 'send'

發送方法更改爲什麼?

回答

1

好的,所以這裏的問題基本上都是網絡上的所有教程,許多Google Talk頁面都過時了信息。人們多次告訴我它的send函數,如果代碼不工作,我的代碼中還有其他地方出現錯誤。

它其實是一個非常簡單的改變,send已經改名爲add

http://api.dartlang.org/docs/releases/latest/dart_io/WebSocket.html

非常令人沮喪,如果你不小心錯過了,而閱讀文檔。

相關問題