public string GetFileSizeString(string dfsfile) { ensureconnected(); netstm.WriteByte((byte)'s'); XContent.SendXContent(netstm, dfsfile); ensurenextplus(); string ssize = XContent.ReceiveXString(netstm, buf); return(ssize); }
void ensurenextplus() { #if DEBUG ensureconnected(); #endif int ib = netstm.ReadByte(); if ('+' != ib) { if ('-' == ib) { string errmsg = XContent.ReceiveXString(netstm, null); throw new Exception("Error from DFS protocol: " + errmsg); } else { throw new Exception("DFS protocol did not return a success"); } } }