getConnection method
Implementation
Connection getConnection() {
switch (type) {
case SocksConnectionType.connect:
return this is TcpConnection
? this as TcpConnection
: TcpConnection(this);
case SocksConnectionType.associate:
return this is UdpConnection
? this as UdpConnection
: UdpConnection(this);
default:
throw UnimplementedError('Command.');
}
}