示例#1
0
    public Options()
        : base()
    {
        listenMode = new CLSwitch('l', "listen mode", "Specifies that NetCat will listen for a tcp connection");
        Add(listenMode);

        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);

        tcpSendWindow = new CLInt32Argument("send-window", "Size of TCP send window (0 means network stack window size)");
        tcpSendWindow.SetDefault(0);
        Add(tcpSendWindow);
        tcpReceiveWindow = new CLInt32Argument("recv-window", "Size of TCP recv window (0 means network stack window size)");
        tcpReceiveWindow.SetDefault(0);
        Add(tcpReceiveWindow);
    }
示例#2
0
    public Options()
        : base()
    {
        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);
    }
        public WebServerOptions()
            : base()
        {
            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listen Port", "The port number to listen on");
            port.SetDefault(80);
            Add(port);

            defaultIndexFile = new CLStringArgument('i', "Default Index File", "Filename of the default file to send when the client requests a directory");
            defaultIndexFile.SetDefault("index.html");
            Add(defaultIndexFile);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);

            logFile = new CLStringArgument("log", "File for message log");
            Add(logFile);

            logData = new CLSwitch('d', "log-data", "Use to turn on data logging");
            Add(logData);
        }