Esempio n. 1
0
 /** see readme.txt */
 public bool More()
 {
     if (cache == null)
     {
         session.stream.WriteByte(4);
         session.Send(id);
         cache = new ArrayList();
         while (session.Read() > 0)
         {
             cache.Add(session.Receive());
         }
         if (!session.Ok())
         {
             throw new IOException(session.Receive());
         }
     }
     return(pos < cache.Count);
 }
Esempio n. 2
0
        /** see readme.txt */
        private string Exec(byte cmd, string arg)
        {
            session.stream.WriteByte(cmd);
            session.Send(arg);
            string s = session.Receive();

            if (!session.Ok())
            {
                throw new IOException(session.Receive());
            }
            return(s);
        }