<?php


namespace Mainto\RpcServer\RpcServer;


use Mainto\RpcServer\Protocol\Request\Request;
use Mainto\RpcServer\Protocol\Response\Response;
use Mainto\RpcServer\Util\Net\Conn;

interface ConnectionHandler {
    public function onRequest(Request $request): Response;

    public function onClose(Conn $conn);

    public function beforeStart (Conn $conn);

    public function onSent(Conn $conn): bool ;
}