Wrench\Listener\OriginPolicy

class OriginPolicy
property allowed

protected

__construct($allowed)
Parameters:
  • $allowed
onHandshakeRequest(Connection $connection, $path, $origin, $key, $extensions)

Handshake request listener

Closes the connection on handshake from an origin that isn’t allowed

Parameters:
  • $connection (Connection) –
  • $path (string) –
  • $origin (string) –
  • $key (string) –
  • $extensions (array) –
isAllowed($origin)

Whether the specified origin is allowed under this policy

Parameters:
  • $origin (string) –
Returns:

boolean

listen(Server $server)
Parameters: