<?php


namespace Mainto\RpcServer\Util\Net;


use Mainto\RpcServer\Util\Net\Conn\FastMQConn;
use Mainto\RpcServer\Util\Net\Conn\TcpConn;
use Mainto\RpcServer\Util\Net\Conn\UnixConn;

class Dialer {
    public static function dialUnix(string $address): UnixConn {
        return UnixConn::newConnByAddress($address);
    }

    public static function dialTcp(string $address): TcpConn {
        return TcpConn::newConnByAddress($address);
    }

    public static function dialFastMQ(string $address): FastMQConn {
        return FastMQConn::newConnByAddress($address);
    }
}