Echo Server+client

Type in a message on the client, and the server echos it back. Works,
but for some reason the program splits " " (spaces) when sending over
the network. Also, when the client closes, the server goes into an
infinite loop. Need to find proper way to break out of
talking/communication loop.