+ function rd_data_set($curtime, $stat, $subst, $step, $from)
+ {
+ $this->rd_endtime = $curtime + STREAM_TIMEOUT;
+ $this->rd_stat = $stat;
+ $this->rd_subst = $subst;
+ $this->rd_step = $step;
+ $this->rd_from = $from;
+ $this->rd_scristp = 0;
+ $this->rd_tout = $curtime + RD_STREAM_TIMEOUT;
+ }
+
+ function rd_socket_get() {
+ return ($this->rd_socket);
+ }
+
+ function rd_socket_set($sock) {
+ $this->rd_socket = $sock;
+ }
+
+ function rd_tout_get()
+ {
+ return ($this->rd_tout);
+ }
+
+ function rd_tout_set($tm)
+ {
+ $this->rd_tout = $tm;
+ }
+
+ function rd_tout_is_expired($tm)
+ {
+ // printf("rd_tout %d tm %d\n", $this->rd_tout, $tm);
+ return ($this->rd_tout < $tm);
+ }
+
+ function rd_endtime_is_expired($tm)
+ {
+ // printf("rd_endtime %d tm %d\n", $this->rd_tout, $tm);
+ return ($this->rd_endtime < $tm);
+ }
+
+ function rd_tout_reset($tm)
+ {
+ $this->rd_tout = $tm + RD_STREAM_TIMEOUT;
+ }
+