Re: creating a tcp server
You must be doing something wrong in the client, connecting with telnet works.
Here's how I tested it:
With the server running:
Press start, (on xp then press run) and type "cmd" and press enter
type "telnet localhost 8000" and press enter
type anything to send it to the server
push the button in your server to see "<valor>mmf</valor>" in the telnet window.
EDIT: Ah! Seems the client has to have sent something to the server for it to know who to send back to. To send to everyone you'll need to use a loop for "CountSockets( "MooSock" )" times and the "select socket" action to choose who to send back to one by one.
Re: creating a tcp server
Hi, I did not get it... Let me explain what I'm doing:
1. Start the server at por 8000.
2. Make the connection (a flash client) - ok.
3. Send a message from the flash client - ok, the server receives it.
Now, with your suggestion:
4. When I want to send a message I start a fastloop "CountSockets("MooSock")" times.
5. On the loop at the server object I select socket "loop index" and then send the text line "<valor>from mmf</valor>".
This isn't working... Well, the flash can send messages to mmf at any time, but this message return does not happen.
The updated file is here.
Re: creating a tcp server
Then the problem is in the flash file.
EDIT: Evidence that the server works:
http://dynamicarcade.co.uk/Dumping%2.../tcpserver.png
EDIT2: a good test for tcp clients is connecting to a webserver (e.g. www.google.com) on port 80 and sending "GET /"+newline+newline and see what happens.
Re: creating a tcp server
You were right. I misused some flash classes. I'll fix things up and will post an example of flash/mmf communication using this soon.
Thank you a lot!