Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - robochase6000

Pages: [1]
1
Network / Socket Server -- send cross domain policy to Flash Client
« on: February 23, 2011, 07:15:25 pm »
I was able to solve this by compacting the cross domain policy file 'flattened' into a single string and sending it off to the Flash client when the client first establishes a connection, like so:

Code: [Select]

// client just established connection with socket server,
// send cross domain policy info
char ToSend[] = "<?xml version='1.0'?>< ... etc";// i abbreviated this, you would want the full policy file in this string.

Client.Send(ToSend, sizeof(ToSend));


Seems to work o.k.  Hopefully this post helps others out :)

2
Network / Socket Server -- send cross domain policy to Flash Client
« on: February 23, 2011, 06:37:33 am »
I've got a pretty bare-bones socket server written with SFML.  I can connect and communicate with the server when using a client written with SFML.

I want to be able to communicate with the server using a client written in Flash.  So far, my Flash client is able to connect to the server, but it doesn't get any further than that because Flash is waiting for a 'cross domain policy' file (xml) from the server to validate some networking stuff.

Anyone come across this and, if so, how do you handle this?  I would imagine when a connection with the client is first established, I could try having the server send the xml file to the client.  

Here is what my xml file looks like:

Code: [Select]

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>

Pages: [1]
anything