uses constant definition; implements retry
adds buf_put_string and buf_put_short, fixes bugs and chat1 sends message back to client
fixes out-by-one bug in buf_put_string