Start with buyer_seller_socket and then try to reduce to my problem.
Well-typed Redis example.