diff src/c/urweb.c @ 669:f68eee90dbcf

Press a button to send a message
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Mar 2009 15:16:34 -0400
parents b0c1a46b1f15
children 729e65db2e2f
line wrap: on
line diff
--- a/src/c/urweb.c	Sun Mar 22 15:05:07 2009 -0400
+++ b/src/c/urweb.c	Sun Mar 22 15:16:34 2009 -0400
@@ -342,6 +342,7 @@
     pthread_mutex_lock(&c->data.used.lock);
 
     if (c->data.used.sock != -1) {
+      printf("Immediate send\n");
       uw_really_send(c->data.used.sock, begin_msgs, sizeof(begin_msgs) - 1);
       uw_really_send(c->data.used.sock, pre, preLen);
       uw_really_send(c->data.used.sock, msg, len);
@@ -349,6 +350,7 @@
       close(c->data.used.sock);
       c->data.used.sock = -1;
     } else {
+      printf("Delayed send\n");
       buf_append(&c->data.used.msgs, pre, preLen);
       buf_append(&c->data.used.msgs, msg, len);
       buf_append(&c->data.used.msgs, "\n", 1);