prepare send the sample to client.