Flash client Java server variables

Hello.

I’m currently working with flash socket connection to java server.
I got basic server working and everythings working fine and soon I’m going to start making game.

Just one problem, what is the best way to send variables through sockets to java or back in flash?

Can I send objects or array’s through it ? or can I call a function through sockets ?

Thanks for help :slight_smile: