#include <algorithm>
#include "stg/common.h"
+#include "stg/plugin_creator.h"
#include "smux.h"
#include "utils.h"
-class SMUX_CREATOR
-{
-private:
- SMUX * smux;
-
-public:
- SMUX_CREATOR() : smux(new SMUX()) {}
- ~SMUX_CREATOR() { delete smux; }
-
- SMUX * GetPlugin() { return smux; }
-};
-
-SMUX_CREATOR sac;
+PLUGIN_CREATOR<SMUX> sac;
PLUGIN * GetPlugin()
{
return sac.GetPlugin();
}
-int ParseIntInRange(const std::string & str,
- int min,
- int max,
- int * val)
-{
-if (str2x(str.c_str(), *val))
- {
- return -1;
- }
-if (*val < min || *val > max)
- {
- return -1;
- }
-return 0;
-}
-
SMUX_SETTINGS::SMUX_SETTINGS()
: ip(0),
port(0)