2005-11-11 Carl Worth <cworth@cworth.org>
authorCarl Worth <carl@theworths.org>
Sat, 12 Nov 2005 01:21:21 +0000 (01:21 +0000)
committerCarl Worth <carl@theworths.org>
Sat, 12 Nov 2005 01:21:21 +0000 (01:21 +0000)
commit5d56d3cd8b4685e905ed604277ac9cb32c876127
tree228b223d4f12cf60239063e37b9f1e6f1a662ce7
parentded32923a25488449be27687013845d7fa0e9e5e
2005-11-11  Carl Worth  <cworth@cworth.org>

        * 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.
ChangeLog
src/Makefile.am
src/ttt-args.c
src/ttt-client.c
src/ttt-client.h [new file with mode: 0644]
src/ttt-server.c
src/ttt-server.h [new file with mode: 0644]
src/ttt-socket.c
src/ttt-socket.h
src/ttt.c [new file with mode: 0644]
src/ttt.h