Exemplo n.º 1
0
        protected void sendRequests()
        {
            Session _session = getSession();
            Request request;

            if (agent_forwarding)
            {
                request = new RequestAgentForwarding();
                request.request(_session, this);
            }

            if (xforwading)
            {
                request = new RequestX11();
                request.request(_session, this);
            }

            if (pty)
            {
                request = new RequestPtyReq();
                ((RequestPtyReq)request).setTType(ttype);
                ((RequestPtyReq)request).setTSize(tcol, trow, twp, thp);
                if (terminal_mode != null)
                {
                    ((RequestPtyReq)request).setTerminalMode(terminal_mode);
                }
                request.request(_session, this);
            }

            if (env != null)
            {
                foreach (KeyValuePair <byte[], byte[]> kv in env)
                {
                    request = new RequestEnv();
                    ((RequestEnv)request).setEnv(kv.Key, kv.Value);
                    request.request(_session, this);
                }
            }
        }
Exemplo n.º 2
0
        protected void sendRequests()
        {
            Session _session = getSession();
            Request request;
            if (agent_forwarding)
            {
                request = new RequestAgentForwarding();
                request.request(_session, this);
            }

            if (xforwading)
            {
                request = new RequestX11();
                request.request(_session, this);
            }

            if (pty)
            {
                request = new RequestPtyReq();
                ((RequestPtyReq)request).setTType(ttype);
                ((RequestPtyReq)request).setTSize(tcol, trow, twp, thp);
                if (terminal_mode != null)
                {
                    ((RequestPtyReq)request).setTerminalMode(terminal_mode);
                }
                request.request(_session, this);
            }

            if (env != null)
            {
                foreach(KeyValuePair<byte[],byte[]> kv in env)
                {
                    request = new RequestEnv();
                    ((RequestEnv)request).setEnv(kv.Key, kv.Value);
                    request.request(_session, this);
                }
            }
        }