Beispiel #1
0
        /// <summary> Open a file store on the D3 server
        /// </summary>
        /// <param name="pcon">The conneciton to the server
        /// </param>
        /// <param name="paccount">The account name where is store the file
        /// </param>
        /// <param name="pfilename">The name of the file to open
        ///
        /// </param>
        public D3FileTcp(D3Connection pcon, System.String paccount, System.String pfilename)
        {
            D3Buffer buf;

            this.con    = pcon;
            fd          = 0;
            filename    = pfilename;
            accountname = paccount;

            buf = this.con.doit(D3Constants._D3_OPEN + "\x0001" + paccount + "\x0001" + pfilename + "\x0001");
            if (buf.Status != D3Constants.D3_OK)
            {
                throw new D3Exception("Erreur d'ouverture de " + paccount + "," + pfilename + ",");
            }

            try
            {
                fd = System.Int32.Parse((System.String)buf.Data[0]);
            }
            catch (System.FormatException e)
            {
                throw new D3Exception("Erreur d'ouverture de " + paccount + "," + pfilename + "," + e.ToString());
            }
        }
Beispiel #2
0
 /// <summary> Create a D3Session who use a TCP/IP socket to cummunicate with the server
 /// </summary>
 public D3SessionTcp(D3Connection pcon)
 {
     myconnection = pcon;
 }
Beispiel #3
0
 /// <summary> Create a select list from a file descriptor
 /// </summary>
 /// <param name="pcon">The D3 connection used to get the key of the select list
 /// </param>
 /// <param name="pselect">The select descriptor use by the D3 server to manage the select list
 /// </param>
 /// <param name="nbelement">The number of element in the select list
 ///
 /// </param>
 public D3SelectListFile(D3Connection pcon, System.String pselect, int nbelement)
 {
     this.con        = pcon;
     this.select     = pselect;
     this.nbelements = nbelements;
 }
Beispiel #4
0
 /// <summary> Open a file store on the D3 server using the account where the server is running
 /// </summary>
 /// <param name="pcon">The conneciton to the server
 /// </param>
 /// <param name="pfilename">The name of the file to open
 ///
 /// </param>
 public D3FileTcp(D3Connection pcon, System.String pfilename) : this(pcon, "", pfilename)
 {
 }