Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function socketConnect(e:Event) {
- // We have connected successfully!
- trace('Connected to the server!');
- // Hook the data connection
- //sock.addEventListener(ProgressEvent.SOCKET_DATA, socketData);
- var buff:ByteArray = new ByteArray();
- writeString(buff, json + '\r');
- sock.writeBytes(buff, 0, buff.length);
- sock.flush();
- }
- private static function writeString(buff:ByteArray, write:String){
- trace("Message: "+write);
- trace("Length: "+write.length);
- buff.writeUTF(write);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement