X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=ChangeLog;h=bc176073fc7e0241c19ef2bfce625caaa48faf62;hp=3ff9e6bf600c9431c83944c4c6d4d9c4249b0c8a;hb=15672ac8305a1c5ba0d9bf6edabb0a194c30628e;hpb=152ea9285ef3804783540d46263a7fc9802bc7db diff --git a/ChangeLog b/ChangeLog index 3ff9e6b..bc17607 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,102 @@ +2005-11-14 Carl Worth + + Server now acts as a very simple chat server. + + * src/ttt-client.h: + * src/ttt-client.c: (ttt_client_create), (ttt_client_destroy), + (_append_to_request), (ttt_client_read_into_request_until), + (ttt_client_read_line), (ttt_client_send): Add support to do a + buffering read within the client and to reuse the buffer (which + grows by doubling) from one request to the next. Add function to + send a message to a client. + + * src/ttt-server.c: (ttt_server_init), (ttt_server_create_client): + Add support for a client idea. Resize the server's client list by + doubling. + * src/ttt-server.c: (ttt_server_destroy_client): Add support to + destroy a client. + * src/ttt-server.c: (_handle_client_requests_thread), + (_accept_client): Move handling of client requests up to + ttt-server.c from ttt-client.c. Use threads rather than a fork per + client. + * src/ttt-server.h: + * src/ttt-server.h: (ttt_server_broadcast): Add function to send a + message to all connected clients. + + * src/ttt-socket.h: + * src/ttt-socket.c: (ttt_socket_read), + (ttt_socket_write): Add functions to do blocking read or write of + the specified number of bytes. + + * src/ttt-socket.c: (ttt_socket_accept): Remove fork, so that the + accept function call can take care of anything like that itself. + + * src/x.h: + * src/x.c: (xread), (xwrite): New wrappers for read and write. + + * src/ttt.h: Add TTT_STATUS_EOF, TRUE, and FALSE. + + * src/ttt.c: Need to include ttt-args.h explicitly now. + +2005-11-11 Carl Worth + + * src/ttt-server.h: + * src/ttt-server.c: (ttt_server_init), (ttt_server_add_client), + (_accept_client), (main): Add a new ttt_server_t object with a + mutex-protected list of clients. Move client handling code down + into new ttt-client.c. + + * src/ttt-client.h: + * src/ttt-client.c: (ttt_client_create), (ttt_client_destroy), + (ttt_client_handle_requests): New ttt_client_t object that simply + holds a pointer back to the server as well as the client socket + file descriptor. + + * src/ttt-socket.h: + * src/ttt-socket.c: (ttt_socket_accept): Add closure argument. Add + a call to fork before calling the accept callback. + + * src/ttt-args.c: Hide unused ttt_args_usage from the compiler to + keep it from complaining. + + * src/ttt.c: (main): Rename the client main program from + ttt-client to ttt.c, (since the server code now has its own + ttt-client.c). + + * src/ttt.h: + * src/Makefile.am: Include and link with pthread now that we have + pthread-based mutex locking. + +2005-11-11 Carl Worth + + * src/ttt-server.c: (main): Don't assign to stderr which is + apparently an invalid lvalue on Mac OS X. + + * src/x.h: + * src/x.c: (xfreopen): Change return type to void. + + * src/ttt-board.c: (ttt_board_to_string): Add missing return + statement. + +2005-11-11 Carl Worth + + * configure.in: Key off of src/ttt.h instead of src/ttt.c which no + longer exists. + +2005-11-11 Carl Worth + + * src/ttt.h: + * src/x.c: + * src/x.h: Move include of stdarg.h from x.c to ttt.h. + +2005-11-11 Carl Worth + + * src/ttt-board.h: Include ttt.h to get standard includes. + + * src/ttt-socket.c: Replace include of netinet/ip.h with + netinet/in.h which seems to be necessary for BSD libc, (eg. Mac OS + X). + 2005-11-09 Carl Worth * src/Makefile.am: