return retval;
}
+
+int client_read_random_blob(StrBuf *Target, int timeout)
+{
+ CitContext *CCC=CC;
+ int rc;
+
+ rc = client_read_blob(Target, 1, timeout);
+ if (rc > 0)
+ {
+ long len;
+ const char *pch;
+
+ len = StrLength(CCC->ReadBuf);
+ pch = ChrPtr(CCC->ReadBuf);
+
+ if (len > 0)
+ {
+ if (CCC->Pos != NULL) {
+ len -= CCC->Pos - pch;
+ pch = CCC->Pos;
+ }
+ StrBufAppendBufPlain(Target, pch, len, 0);
+ FlushStrBuf(CCC->ReadBuf);
+ CCC->Pos = NULL;
+ return StrLength(Target);
+ }
+ return rc;
+ }
+ else
+ return rc;
+}
+
int client_read_to(char *buf, int bytes, int timeout)
{
CitContext *CCC=CC;
int client_getln (char *buf, int maxbytes);
int CtdlClientGetLine(StrBuf *Target);
int client_read_blob(StrBuf *Target, int bytes, int timeout);
+int client_read_random_blob(StrBuf *Target, int timeout);
void sysdep_master_cleanup (void);
void kill_session (int session_to_kill);
void start_daemon (int do_close_stdio);