What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I’ve written a C sharp server program and a as3 client program. They work fine when I run the flash client in debug inside IDE, but not when I move the client anywhere which I’ve discovered is because I need to send a policy file to the flash client. However, after the server sends the policy file it executes the Socket.Receive(byte b) function but with nothing to receive, and the client never connects to the server (connect function never calls) but no error messages. My best guess is that the policy file is wrong but I’ve tried altering it in many ways, none of which have worked.
C sharp server:
`private static TcpListener myLis;
private static Socket socket;
public static void Main(string args)
myLis = new TcpListener(IPAddress.Parse("192.168.0.5"), 8002);
socket = myLis.AcceptSocket();
// some code removed to keep post short-ish
Console.WriteLine("matched policy file request!");
String policyFile = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<!DOCTYPE cross-domain-policy SYSTEM \"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">" +
"<site-control permitted-cross-domain-policies=\"all\"/>" +
"<allow-access-from domain=\"*\" to-ports=\"*\" secure=\"false\"/>" +
"<allow-http-request-headers-from domain=\"*\" headers=\"*\" secure=\"false\"/>" +
Char characterList = policyFile.ToCharArray();
byte toSend = new Byte[characterList.Length];
for ( int po = 0; po < characterList.Length; po ++)
toSend[po] = (byte) Convert.ToByte(characterList[po]);
// code that was here received and read 3 bytes sent by client to check connection is working
Flash Client simply connects to server and sends 3 bytes on the connect event. I have been running the client by right-click menu, open with internet explorer.
Thank you for your time.
No no no, don’t send the cross domain policy as a socket connection. You need to have an _actual_ file on the server (at the domain root, eg. [www.yoursite.com/crossdomain.xml](http://www.yoursite.com/crossdomain.xml)) because the policy file is requested automatically by the flash player.
You do need to tell it what file to load and where it is, though:
(While it says you can have policy files in subdirectories, a change to Flash Player 10 made it so that there needed to be a global policy file that has to allow the connection and subdirectory files can only deny additional connections, but not permit extra ones; that change messed up one of my games pretty bad back when it happened).
> *Originally posted by **[Draco18s](/forums/4/topics/354369?page=1#posts-7351661):***
> Or actually run a server on your machine. Inside the Flash IDE, Flash pretends to have 100% access permissions (because it’s a testing environment).
> But yes.
Haha, totally forgot that fact for a while. I was super confused at how playerio was running their socket based server locally with no crossdomain.xml
I’ve fixed my problem. Here’s what I did:
1. Made a socket connection with port 843.
2. Send policy file over 843 port socket.
3. When its connects, make ANOTHER socket connection on an unused port (which is almost any) 8002, 8801, 950, 7086 etc.
4. Use the second socket to send and receive data.
Wow, that was a bit of a hassle.