Modules
ADT Database GTK2 GUI IP PiJAX Public Sql Stdio Subversion System Tools Xosd lua v4l2 wx
Recent Changes
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Popular Downloads
Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48
|
Pike Module Reference: module version 0.1, prepared
MODULE Public.Web.CrossDomainPolicy |
Classes File Policy
|
Example
// allow ports 500-512 from example.org
Stdio.File file = listener->accept();
object policy = Public.Web.CrossDomainPolicy.Policy("example.org", 500, 512);
object cfile = Public.Web.CrossDomainPolicy.File(policy);
cfile->assign(file);
// use cfile from now on.
|
CLASS Public.Web.CrossDomainPolicy.Policy |
Methods allow_port_range() create() deny_domain() render_policy()
|
- Description
This class may be used to create a CrossDomainPolicy as used by Adobe Flash Player.
- See also
If you want to use a CrossDomainPolicy for tcp sockets, check out Public.Web.CrossDomainPolicy.File.
-
Method create
void Public.Web.CrossDomainPolicy.Policy()->create(string|void domain, int|void min, void|int max, int(0..1)|void insecure)
- Description
Creates a CrossDomainPolicy. See allow_port_range for arguments.
-
Method allow_port_range
void Public.Web.CrossDomainPolicy.Policy()->allow_port_range(string domain, int min, void|int max, int(0..1)|void insecure)
- Description
Allow the given domain.
- Parameter domain
domain from which access is allowed
- Parameter min
- Parameter max
port range to be allowed
- Parameter secure
if a secure (SSL/TLS) connection is required
-
Method deny_domain
void Public.Web.CrossDomainPolicy.Policy()->deny_domain(string domain)
- Description
Deny the given domain. Undos what allow_port_range does.
-
Method render_policy
string Public.Web.CrossDomainPolicy.Policy()->render_policy()
- Description
Render the policy. Returns a Null-Terminated cross-domain-policy-tag.
This is fine as a reply to a policy-file-request on a XMLsocket. In case you
want to use a policy in a XML file, you need to remove the trailing Null
and enclose this in XML document tags.
|
CLASS Public.Web.CrossDomainPolicy.File |
Methods create()
|
- Description
Stdio.File subclass that replys to CrossDomainPolicy requests,
i.e. on receiving "<policy-file-request/>\0", by sending
a cross-domain-policy-tag. This is needed to accept tcp
connections by Adobe Flash Player in some situations.
If the first bytes of data received do not match a CrossDomainPolicy
request, no reply is sent.
After this first thep the socket operates normally.
- Note
It is not possible to send data first. Data needs to be received first
to determine whether or not a CrossDomainPolicy needs to be sent.
- Note
This module works asynchronously only! Do not use write or read
without callbacks, at least until the CrossDomainPolicy has been
sent.
-
Inherit File
Stdio.File
-
Method create
void Public.Web.CrossDomainPolicy.File()->create(object policy)
- Description
Creates a Public.Web.CrossDomainPolicy.File object for some Public.Web.CrossDomainPolicy.Policy policy.
|
|