/* This is the protosocket function that handles the communication. A protosocket function must always return an int, but must never explicitly return - all return statements are hidden in the PSOCK macros.  */
static int handle_connection(struct hello_world_state *s)
/* This is the protosocket function that handles the communication. A protosocket function must always return an int, but must never explicitly return - all return statements are hidden in the PSOCK macros.  */
static int handle_connection(struct hello_world_state *s)
{
  PSOCK_BEGIN(&s->p);
  PSOCK_SEND_STR(&s->p, "Hello. What is your name?\n\r");
  PSOCK_READTO(&s->p, '\n');
  strncpy(s->name, s->inputbuffer, sizeof(s->name));
  PSOCK_SEND_STR(&s->p, "Hello ");
  PSOCK_SEND_STR(&s->p, s->name);
  PSOCK_CLOSE(&s->p);
  PSOCK_END(&s->p);
}