Your code seems to be wrong in more than one place.
1) The client seems to be getting its own address, putting it into seraddr, and trying to connect to itself! Certainly the server has a different address, unless you are doing a local connection and in this case you should just use 127.0.0.1.
2) At server side, you are accept()ing only once, handling the connection and exiting the thread. This means that your server will accept only one connection and no more. Is this what you wanted?