protected void sendRequests() throws Exception{
    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){
      for(Enumeration _env=env.keys(); _env.hasMoreElements();){
        Object name=_env.nextElement();
        Object value=env.get(name);
        request=new RequestEnv();
        ((RequestEnv)request).setEnv(toByteArray(name), 
                                     toByteArray(value));
        request.request(_session, this);
      }
    }
  }