From what I've read, it looks like you are trying to send data between two swfs with socket connections. Unfortunately due to flash player security restrictions, you cannot create server sockets, only client. So you'd need some kind of server to which your swf clients can talk to.
Some more info on socket programming in AS3.