<?php
/**
* This file is part of workerman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Workerman\Connection;
abstract class ConnectionInterface
{
public static $statistics = array(
'connection_count' => 0,
'total_request' => 0,
'throw_exception' => 0,
'send_fail' => 0,
);
public $onMessage = null;
public $onClose = null;
public $onError = null;
abstract public function send($send_buffer);
abstract public function getRemoteIp();
abstract public function getRemotePort();
abstract public function getRemoteAddress();
abstract public function getLocalIp();
abstract public function getLocalPort();
abstract public function getLocalAddress();
abstract public function isIPv4();
abstract public function isIPv6();
abstract public function close($data = null);
}