a socket model for unionpay project