File: src/Generics/Socket/ServiceCallback.php

Recommend this page to a friend!
  Classes of Maik Greubel  >  PHP Generics  >  src/Generics/Socket/ServiceCallback.php  >  Download  
File: src/Generics/Socket/ServiceCallback.php
Role: Class source
Content type: text/plain
Description: Server socket callback interface
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Test enhancement
Date: 1 year ago
Size: 844 bytes
 

Contents

Class file image Download
<?php

/**
 * This file is part of the PHP Generics package.
 *
 * @package Generics
 */
namespace Generics\Socket;

/**
 * This abstract class is the blueprint for implementing a service callback
 *
 * @author Maik <greubel@nkey.de>
 *
 */
abstract class ServiceCallback
{

   
/**
     * Endpoint
     *
     * @var Endpoint endpoint
     */
   
private $serviceEndpoint;

   
/**
     * Create a new service callback instance
     *
     * @param Endpoint $endPoint
     * The endpoint
     */
   
public function __construct(Endpoint $endPoint)
    {
       
$this->serviceEndpoint = $endPoint;
    }

   
/**
     * Any implementor must provide such a functions
     *
     * @return boolean true in case of service should keep on running, false if it shall stop
     */
   
abstract public function callback(Socket $socket);
}


For more information send a message to info at phpclasses dot org.