Lines Matching defs:to

31 "	instance is a session. Each session supports up to 64 message"
32 " channels, labeled from 0 to 63. A client connects to \bmbb\b and"
34 " messages in the mask are sent to the client. Channel 0 is reserved"
38 " be prefixed by its channel number. The server changes this to"
46 "[d:debug?Set the debug trace level to \alevel\a. Higher levels produce more"
49 " inactivity. The default is to run until the system crashes.]:[time]"
57 " messages on channel 0 are not sent to the other clients. The control"
118 data(register State_t* state, register Connection_t* to, char* s, size_t n, int force)
122 message((-1, "[%d] %d backlog", __LINE__, to->fp->fd));
126 return write(to->fp->fd, s, n);
130 note(Css_t* css, register Connection_t* to, int log, char* s, size_t n, int force, Cssdisc_t* disc)
135 if ((force || to->blocked[log] < 0) && (z = data(state, to, s, n, force)) != n)
148 message((-1, "[%d] %s: %d log", __LINE__, state->logs[log].name, to->fp->fd));
154 if (to->blocked[log] < 0)
159 to->blocked[log] = state->logs[log].offset - n + z;
160 message((-1, "[%d] %s: %d offset %I*d", __LINE__, state->logs[log].name, to->fp->fd, sizeof(to->blocked[log]), to->blocked[log]));
161 cssfd(css, to->fp->fd, CS_POLL_READ|CS_POLL_WRITE);
164 if (to->blocked[log] >= 0)
166 message((-1, "[%d] %s: %d unblock", __LINE__, state->logs[log].name, to->fp->fd));
167 to->blocked[log] = -1;
192 error(ERROR_SYSTEM|3, "%s: cannot seek to %I*d", state->logs[log].name, sizeof(con->blocked[log]), con->blocked[log]);
198 error(ERROR_SYSTEM|3, "%s: cannot seek to %I*d", state->logs[log].name, sizeof(state->logs[log].offset), state->logs[log].offset);
203 post(Css_t* css, Cssdisc_t* disc, Connection_t* from, register Connection_t* to, int channel, const char* format, ...)
224 if (!to)
226 for (to = state->all; to; to = to->next)
227 if ((to->mask & m) && to != from)
228 note(css, to, state->log, s, n, 0, disc);
230 else if (to->mask & m)
231 note(css, to, state->log, s, n, 0, disc);