I want to write a (singleton) container for instances of my class
templates, however, I am not too sure on how to:
1). Store the instances
2). How to write the acccesor method (instance()) to retrieve an
instance of particular template
3). What type to return an instance as ..
Assuming I have the following code:
class template
template <class T1, class T2>
class MyTree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
// Notes
// Instance prototype not completed (see question 2 and 3)
// Ideally, when an instance of a particular class is requested, if it
dosen't yet exist, then an
// instance is created and stored in the 'repository'
class Container
{
instance();
};
//Main.cpp
int main(int argc, char* argv[])
{
Container c;
MyTree<double, int* t1 = c.instance(/*some args here*/);
MyTree<string, double*t2 = c.instance(/*some args here*/);
}
Last but not the least, I want to be able to treat objects returned by
the instance() method, in a generic way (i.e. in this example, I want
to be able to treat them generically, as trees). Should I use
inheritance (i.e. the class template inherits from a base Tree class)
like this:
template <class T1, class T2>
class MyTree : public Tree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
or is there a better way? 4 2366
Bit Byter ha scritto:
I want to write a (singleton) container for instances of my class
templates, however, I am not too sure on how to:
1). Store the instances
2). How to write the acccesor method (instance()) to retrieve an
instance of particular template
3). What type to return an instance as ..
Assuming I have the following code:
class template
template <class T1, class T2>
class MyTree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
// Notes
// Instance prototype not completed (see question 2 and 3)
// Ideally, when an instance of a particular class is requested, if it
dosen't yet exist, then an
// instance is created and stored in the 'repository'
class Container
{
instance();
};
//Main.cpp
int main(int argc, char* argv[])
{
Container c;
MyTree<double, int* t1 = c.instance(/*some args here*/);
MyTree<string, double*t2 = c.instance(/*some args here*/);
}
Last but not the least, I want to be able to treat objects returned by
the instance() method, in a generic way (i.e. in this example, I want
to be able to treat them generically, as trees). Should I use
inheritance (i.e. the class template inherits from a base Tree class)
like this:
template <class T1, class T2>
class MyTree : public Tree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
or is there a better way?
Hi,
I don't know exactly what you want to do, so there might be better
solutions...
But they way you've put it, I guess using something like boost::any
should do what
you want. Check the code below.
Hope it helps a little.
Bye,
Francesco
#include <vector>
#include <boost/any.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <iostream>
using namespace boost;
//------------------------------------------------------------
class CObjBase
{
public:
virtual ~CObjBase() {}
virtual any DoSome( any const & ) = 0;
virtual any DoOther( any const & inArg1,
any const & inArg2 ) = 0;
virtual bool IsOfType( std::type_info const *,
std::type_info const * ) = 0;
};
//------------------------------------------------------------
template< typename T1, typename T2 >
class CObjConcrete : public CObjBase
{
public:
any DoSome( any const & inArg1 )
{
T2 obj = any_cast< T2 >( inArg1 ); // use object
std::cout << "-------\n";
std::cout << "Arg1: " << obj << std::endl;
return T1(); // return whatever;
}
any DoOther( any const & inArg1, any const & inArg2 )
{
T1 obj1 = any_cast< T1 >( inArg1 );
T2 obj2 = any_cast< T2 >( inArg2 );
std::cout << "-------\n";
std::cout << "Arg1 : " << obj1 << std::endl;
std::cout << "Arg2 : " << obj2 << std::endl;
return obj2;
}
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
};
//------------------------------------------------------------
class CFactory
{
public:
static CFactory & GetInstance()
{ static CFactory sObj; return sObj; }
template< typename T1, typename T2 >
shared_ptr< CObjBase Get();
private:
typedef std::vector< shared_ptr< CObjBase CRegister;
CRegister mRegister;
CFactory() {}
CFactory( CFactory const & );
~CFactory() {}
CFactory & operator=( CFactory const & );
};
CFactory & Factory() { return CFactory::GetIn stance(); }
//------------------------------------------------------------
template< typename T1, typename T2 >
shared_ptr< CObjBase CFactory::Get()
{
CRegister::iter ator iter = std::find_if(
mRegister.begin (),
mRegister.end() ,
bind( &CObjBase::IsOf Type, _1, &typeid( T1 ), &typeid( T2 ) )
);
if( iter == mRegister.end() )
{
std::cout << "CREATING\n ";
shared_ptr< CObjBase ptr( new CObjConcrete< T1, T2 );
mRegister.push_ back( ptr );
return ptr;
}
else
{
std::cout << "REUSING\n" ;
return *iter;
}
}
//------------------------------------------------------------
int main()
{
Factory().Get< int, double >()->DoSome( 13.56 );
Factory().Get< std::string, int >()->DoOther(
std::string( "ola" ),
100
);
Factory().Get< int, double >()->DoSome( 67.67 );
Factory().Get< std::string, int >()->DoOther(
std::string( "TEST" ),
900
);
std::cin.get();
}
//end code
Francesco wrote:
>
Bit Byter ha scritto:
>I want to write a (singleton) container for instances of my class templates, however, I am not too sure on how to:
1). Store the instances 2). How to write the acccesor method (instance()) to retrieve an instance of particular template 3). What type to return an instance as ..
Assuming I have the following code:
class template
template <class T1, class T2> class MyTree { T1 foo(const T2& a1); T2 foobar(const T1& a1, const T2& a2); };
// Notes // Instance prototype not completed (see question 2 and 3) // Ideally, when an instance of a particular class is requested, if it dosen't yet exist, then an // instance is created and stored in the 'repository' class Container { instance(); };
//Main.cpp
int main(int argc, char* argv[]) { Container c;
MyTree<double, int* t1 = c.instance(/*some args here*/); MyTree<string, double*t2 = c.instance(/*some args here*/);
}
Last but not the least, I want to be able to treat objects returned by the instance() method, in a generic way (i.e. in this example, I want to be able to treat them generically, as trees). Should I use inheritance (i.e. the class template inherits from a base Tree class) like this:
template <class T1, class T2> class MyTree : public Tree { T1 foo(const T2& a1); T2 foobar(const T1& a1, const T2& a2); };
or is there a better way?
Hi,
I don't know exactly what you want to do, so there might be better
solutions...
But they way you've put it, I guess using something like boost::any
should do what
you want. Check the code below.
Hope it helps a little.
Bye,
Francesco
#include <vector>
#include <boost/any.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <iostream>
using namespace boost;
//------------------------------------------------------------
class CObjBase
{
public:
virtual ~CObjBase() {}
virtual any DoSome( any const & ) = 0;
virtual any DoOther( any const & inArg1,
any const & inArg2 ) = 0;
virtual bool IsOfType( std::type_info const *,
std::type_info const * ) = 0;
};
//------------------------------------------------------------
template< typename T1, typename T2 >
class CObjConcrete : public CObjBase
{
public:
any DoSome( any const & inArg1 )
{
T2 obj = any_cast< T2 >( inArg1 ); // use object
std::cout << "-------\n";
std::cout << "Arg1: " << obj << std::endl;
return T1(); // return whatever;
}
any DoOther( any const & inArg1, any const & inArg2 )
{
T1 obj1 = any_cast< T1 >( inArg1 );
T2 obj2 = any_cast< T2 >( inArg2 );
std::cout << "-------\n";
std::cout << "Arg1 : " << obj1 << std::endl;
std::cout << "Arg2 : " << obj2 << std::endl;
return obj2;
}
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
};
//------------------------------------------------------------
class CFactory
{
public:
static CFactory & GetInstance()
{ static CFactory sObj; return sObj; }
template< typename T1, typename T2 >
shared_ptr< CObjBase Get();
private:
typedef std::vector< shared_ptr< CObjBase CRegister;
CRegister mRegister;
CFactory() {}
CFactory( CFactory const & );
~CFactory() {}
CFactory & operator=( CFactory const & );
};
CFactory & Factory() { return CFactory::GetIn stance(); }
//------------------------------------------------------------
template< typename T1, typename T2 >
shared_ptr< CObjBase CFactory::Get()
{
CRegister::iter ator iter = std::find_if(
mRegister.begin (),
mRegister.end() ,
bind( &CObjBase::IsOf Type, _1, &typeid( T1 ), &typeid( T2 ) )
);
if( iter == mRegister.end() )
{
std::cout << "CREATING\n ";
shared_ptr< CObjBase ptr( new CObjConcrete< T1, T2 );
mRegister.push_ back( ptr );
return ptr;
}
else
{
std::cout << "REUSING\n" ;
return *iter;
}
}
//------------------------------------------------------------
int main()
{
Factory().Get< int, double >()->DoSome( 13.56 );
Factory().Get< std::string, int >()->DoOther(
std::string( "ola" ),
100
);
Factory().Get< int, double >()->DoSome( 67.67 );
Factory().Get< std::string, int >()->DoOther(
std::string( "TEST" ),
900
);
std::cin.get();
}
//end code
Thanks Francesco,
This is exactly what I was looking for. I have a quick question about
your IsOfType function:
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
You are using 'and' is that in the boost namespace? (I couldnt find it),
or did you simply mean the unary boolean 'and' operator (&&) ?
(2b|!2b)==? ha scritto:
Francesco wrote:
Bit Byter ha scritto:
I want to write a (singleton) container for instances of my class
templates, however, I am not too sure on how to:
1). Store the instances
2). How to write the acccesor method (instance()) to retrieve an
instance of particular template
3). What type to return an instance as ..
Assuming I have the following code:
class template
template <class T1, class T2>
class MyTree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
// Notes
// Instance prototype not completed (see question 2 and 3)
// Ideally, when an instance of a particular class is requested, if it
dosen't yet exist, then an
// instance is created and stored in the 'repository'
class Container
{
instance();
};
//Main.cpp
int main(int argc, char* argv[])
{
Container c;
MyTree<double, int* t1 = c.instance(/*some args here*/);
MyTree<string, double*t2 = c.instance(/*some args here*/);
}
Last but not the least, I want to be able to treat objects returned by
the instance() method, in a generic way (i.e. in this example, I want
to be able to treat them generically, as trees). Should I use
inheritance (i.e. the class template inherits from a base Tree class)
like this:
template <class T1, class T2>
class MyTree : public Tree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
or is there a better way?
Hi,
I don't know exactly what you want to do, so there might be better
solutions...
But they way you've put it, I guess using something like boost::any
should do what
you want. Check the code below.
Hope it helps a little.
Bye,
Francesco
#include <vector>
#include <boost/any.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <iostream>
using namespace boost;
//------------------------------------------------------------
class CObjBase
{
public:
virtual ~CObjBase() {}
virtual any DoSome( any const & ) = 0;
virtual any DoOther( any const & inArg1,
any const & inArg2 ) = 0;
virtual bool IsOfType( std::type_info const *,
std::type_info const * ) = 0;
};
//------------------------------------------------------------
template< typename T1, typename T2 >
class CObjConcrete : public CObjBase
{
public:
any DoSome( any const & inArg1 )
{
T2 obj = any_cast< T2 >( inArg1 ); // use object
std::cout << "-------\n";
std::cout << "Arg1: " << obj << std::endl;
return T1(); // return whatever;
}
any DoOther( any const & inArg1, any const & inArg2 )
{
T1 obj1 = any_cast< T1 >( inArg1 );
T2 obj2 = any_cast< T2 >( inArg2 );
std::cout << "-------\n";
std::cout << "Arg1 : " << obj1 << std::endl;
std::cout << "Arg2 : " << obj2 << std::endl;
return obj2;
}
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
};
//------------------------------------------------------------
class CFactory
{
public:
static CFactory & GetInstance()
{ static CFactory sObj; return sObj; }
template< typename T1, typename T2 >
shared_ptr< CObjBase Get();
private:
typedef std::vector< shared_ptr< CObjBase CRegister;
CRegister mRegister;
CFactory() {}
CFactory( CFactory const & );
~CFactory() {}
CFactory & operator=( CFactory const & );
};
CFactory & Factory() { return CFactory::GetIn stance(); }
//------------------------------------------------------------
template< typename T1, typename T2 >
shared_ptr< CObjBase CFactory::Get()
{
CRegister::iter ator iter = std::find_if(
mRegister.begin (),
mRegister.end() ,
bind( &CObjBase::IsOf Type, _1, &typeid( T1 ), &typeid( T2 ) )
);
if( iter == mRegister.end() )
{
std::cout << "CREATING\n ";
shared_ptr< CObjBase ptr( new CObjConcrete< T1, T2 );
mRegister.push_ back( ptr );
return ptr;
}
else
{
std::cout << "REUSING\n" ;
return *iter;
}
}
//------------------------------------------------------------
int main()
{
Factory().Get< int, double >()->DoSome( 13.56 );
Factory().Get< std::string, int >()->DoOther(
std::string( "ola" ),
100
);
Factory().Get< int, double >()->DoSome( 67.67 );
Factory().Get< std::string, int >()->DoOther(
std::string( "TEST" ),
900
);
std::cin.get();
}
//end code
Thanks Francesco,
This is exactly what I was looking for. I have a quick question about
your IsOfType function:
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
You are using 'and' is that in the boost namespace? (I couldnt find it),
or did you simply mean the unary boolean 'and' operator (&&) ?
No, it's not boost stuff, it's standard: just an alternative token to
&&. Check out the standard @ "2.5 Alternative Tokens"...
I believe it's a binary op though... ;-)
Glad I helped, bye,
Francesco
(2b|!2b)==? ha scritto:
Francesco wrote:
Bit Byter ha scritto:
I want to write a (singleton) container for instances of my class
templates, however, I am not too sure on how to:
1). Store the instances
2). How to write the acccesor method (instance()) to retrieve an
instance of particular template
3). What type to return an instance as ..
Assuming I have the following code:
class template
template <class T1, class T2>
class MyTree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
// Notes
// Instance prototype not completed (see question 2 and 3)
// Ideally, when an instance of a particular class is requested, if it
dosen't yet exist, then an
// instance is created and stored in the 'repository'
class Container
{
instance();
};
//Main.cpp
int main(int argc, char* argv[])
{
Container c;
MyTree<double, int* t1 = c.instance(/*some args here*/);
MyTree<string, double*t2 = c.instance(/*some args here*/);
}
Last but not the least, I want to be able to treat objects returned by
the instance() method, in a generic way (i.e. in this example, I want
to be able to treat them generically, as trees). Should I use
inheritance (i.e. the class template inherits from a base Tree class)
like this:
template <class T1, class T2>
class MyTree : public Tree
{
T1 foo(const T2& a1);
T2 foobar(const T1& a1, const T2& a2);
};
or is there a better way?
Hi,
I don't know exactly what you want to do, so there might be better
solutions...
But they way you've put it, I guess using something like boost::any
should do what
you want. Check the code below.
Hope it helps a little.
Bye,
Francesco
#include <vector>
#include <boost/any.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <iostream>
using namespace boost;
//------------------------------------------------------------
class CObjBase
{
public:
virtual ~CObjBase() {}
virtual any DoSome( any const & ) = 0;
virtual any DoOther( any const & inArg1,
any const & inArg2 ) = 0;
virtual bool IsOfType( std::type_info const *,
std::type_info const * ) = 0;
};
//------------------------------------------------------------
template< typename T1, typename T2 >
class CObjConcrete : public CObjBase
{
public:
any DoSome( any const & inArg1 )
{
T2 obj = any_cast< T2 >( inArg1 ); // use object
std::cout << "-------\n";
std::cout << "Arg1: " << obj << std::endl;
return T1(); // return whatever;
}
any DoOther( any const & inArg1, any const & inArg2 )
{
T1 obj1 = any_cast< T1 >( inArg1 );
T2 obj2 = any_cast< T2 >( inArg2 );
std::cout << "-------\n";
std::cout << "Arg1 : " << obj1 << std::endl;
std::cout << "Arg2 : " << obj2 << std::endl;
return obj2;
}
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
};
//------------------------------------------------------------
class CFactory
{
public:
static CFactory & GetInstance()
{ static CFactory sObj; return sObj; }
template< typename T1, typename T2 >
shared_ptr< CObjBase Get();
private:
typedef std::vector< shared_ptr< CObjBase CRegister;
CRegister mRegister;
CFactory() {}
CFactory( CFactory const & );
~CFactory() {}
CFactory & operator=( CFactory const & );
};
CFactory & Factory() { return CFactory::GetIn stance(); }
//------------------------------------------------------------
template< typename T1, typename T2 >
shared_ptr< CObjBase CFactory::Get()
{
CRegister::iter ator iter = std::find_if(
mRegister.begin (),
mRegister.end() ,
bind( &CObjBase::IsOf Type, _1, &typeid( T1 ), &typeid( T2 ) )
);
if( iter == mRegister.end() )
{
std::cout << "CREATING\n ";
shared_ptr< CObjBase ptr( new CObjConcrete< T1, T2 );
mRegister.push_ back( ptr );
return ptr;
}
else
{
std::cout << "REUSING\n" ;
return *iter;
}
}
//------------------------------------------------------------
int main()
{
Factory().Get< int, double >()->DoSome( 13.56 );
Factory().Get< std::string, int >()->DoOther(
std::string( "ola" ),
100
);
Factory().Get< int, double >()->DoSome( 67.67 );
Factory().Get< std::string, int >()->DoOther(
std::string( "TEST" ),
900
);
std::cin.get();
}
//end code
Thanks Francesco,
This is exactly what I was looking for. I have a quick question about
your IsOfType function:
bool IsOfType( std::type_info const * inT1Ptr,
std::type_info const * inT2Ptr )
{
if( *inT1Ptr == typeid( T1 ) and *inT2Ptr == typeid( T2 ) )
return true;
else
return false;
}
You are using 'and' is that in the boost namespace? (I couldnt find it),
or did you simply mean the unary boolean 'and' operator (&&) ?
[this might be a double post... sorry in advance]
Anyway, no 'and' is not boost stuff, it's standard c++: it's just an
alternative token to &&.
Check out the standard @ "2.5 Alternative tokens".
I believe it's a binary op though... ;-)
Glad I helped, bye,
Francesco This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Simon Elliott |
last post by:
I have a class which uses a singleton to output progress messages for
logging or display. It's typically used deep within a hierarchy of
aggregations, inheritances and containers. The singleton keeps things
nice and simple: the classes further up the hierarchy don't need to know
about the mechanism used for handling progress messages.
I now want this class to be more generic, and perhaps put it into a
library. The users of the class may...
|
by: Thomas Matthews |
last post by:
Hi,
I have a Display class. I would like to write a function that takes a
range of objects and displays them. The range would be specified by
two forward iterators: start and end (one past start).
I created a base class "References" to test this concept. I want
the display function to process either a vector<References> or
a list<References>. However, in my compiler (Borland C++ Builder),
the std::list has a different iterator...
|
by: Johan Bergman |
last post by:
Hi,
Maybe someone can help me with this one. The following describes a
somewhat simplified version of my problem, but I think it will be
sufficient.
I want to use class factories (virtual constructors) which have this base
class:
template<class T>
|
by: Jon Wilson |
last post by:
I have a class which needs to accumulate data. The way we get this data
is by calling a member function which returns float on a number of
different objects of different type (they are all the same type for a
given instance of the class, but different types for different instances.)
#include<set>
using namespace std;
template<class T>
|
by: Jon Slaughter |
last post by:
I have a class that is basicaly duplicated throughout several files with
only members names changing according to the class name yet with virtually
the exact same coding going on.
e.g.
class A
{
std::vector<B*> Bs;
public:
| |
by: KK |
last post by:
Hello all,
I have several classes binded by one common interface - say 'sum'
interface which calculates the sum of all the class elements of type
'int'.
class Alphabet
{
int _a;
int _b;
int _c;
|
by: ankitjain.bvcoe |
last post by:
Hi i have the following problem in my design ::::
i want to define an abstract class LogBuffer and derive two singleton
classes from it i.e
AlarmBuffer and FireWallBuffer.For this my design is such that i have
to define data members in class LogBuffer.i.e
************************************************************************************
class LogBuffer
|
by: keepyourstupidspam |
last post by:
Hi,
I am writing a windows service. The code runs fine when I start the
service when my machine is running but
it fails to start automatically when the machine reboots. The code
bombs out when it reaches code that tries to access
a singleton class. This is the code.
|
by: Eric Lilja |
last post by:
As the topic says, I wanted to make a re-usable singleton class that
could create pointers to objects with non-trivial constructors. I came
up with this:
#ifndef SINGLETON_HPP
#define SINGLETON_HPP
template<typename T>
struct DefaultCreatorFunctor
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |