Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UTF-8 每个字符的字节数不同。我怎样才能了解我可以读取多少字节flash.net.Socket.readUTFBytes(length:uint):String?
flash.net.Socket.readUTFBytes(length:uint):String
您的对象中有一个可用的属性Socket,其中包含所需的信息:
Socket
mySocket.addEventListener(ProgressEvent.SOCKET_DATA, _onSocketDataHandler); private function _onSocketDataHandler(e:ProgressEvent):void { var str:String = mySocket.readUTFBytes(mySocket.bytesAvailable); trace(str); }