problem sending data flash client to ofTcpServer

Hello!

i’m trying to connect OF(TcpServer addons example) with flash as3 binary socket, OF connects with flash OK, flash receives “hello client…” message, but when flash send data to OF, nothing appears in OF window.

the code that i use to send data in as3:

  
  
socket.writeUTFBytes("helloooo\n");  
socket.flush();  

i’ve saw three posts in this forum with a similar problem but a i can get no solution, any comment will be grateful.

i need help

thanks

[/code]

You must end your sting messages with [/TCP].
That lets oF server see that the messages has ended.
Therer is a post about comunication between flash and of with tcp, you should take a look a it.

This worked fo me:

(In the actionscript)

  
  
  
private function writeToServer(srt:String):void  
{  
 str += "[/TCP]";  
        try {  
            socket.writeUTFBytes(str);  
	  socket.flush();  
			//trace("santo llamando a: "+str);  
        }  
        catch(e:IOError) {  
            trace(e);  
        }  
}  
  

PD: It took me a while to discover this, even with the other post, wich are great but… perhaps I´m not.

Muchisimas gracias Xumo!

only adding [/TCP] to string and flash send data to OF correctly

i take one day and a half trying to do this

next step…