Hi Dennis, thanks, your code works. however, it does not work if the client is indefinitely running. i would like to have a client that is always running and continually sending and receiving messages from the server. i do not know how to do this using sockets. thanks. g