PT_THREAD(handle_connection(struct ircc_state *s))
PT_THREAD(send_message(struct ircc_state *s))
PT_THREAD(handle_connection(struct ircc_state *s)){  PT_BEGIN(&s->pt);  SOCKET_INIT(&s->s, s->inputbuf, sizeof(s->inputbuf));    PT_WAIT_THREAD(&s->pt, setup_connection(s));  while(1) {    PT_WAIT_UNTIL(&s->pt, data_or_command(s));    if(SOCKET_NEWDATA(&s->s)) {      PT_WAIT_THREAD(&s->pt, handle_input(s));          }           switch(s->command) {    case COMMAND_JOIN:      s->command = COMMAND_NONE;      PT_WAIT_THREAD(&s->pt, join_channel(s));      break;    case COMMAND_PART:      s->command = COMMAND_NONE;      PT_WAIT_THREAD(&s->pt, part_channel(s));      break;    case COMMAND_MSG:      s->command = COMMAND_NONE;      PT_WAIT_THREAD(&s->pt, send_message(s));      break;    case COMMAND_LIST:      s->command = COMMAND_NONE;      PT_WAIT_THREAD(&s->pt, list_channel(s));      break;    case COMMAND_QUIT:      s->command = COMMAND_NONE;      tcp_markconn(uip_conn, NULL);      SOCKET_CLOSE(&s->s);      ek_post(EK_PROC_ID(EK_CURRENT()), EK_EVENT_REQUEST_EXIT, NULL);      PT_EXIT(&s->pt);      break;    default:      break;    }  }    PT_END(&s->pt);}