Hi Manojba,
There are several ways in which you could implement your application but it depends on how you want your application to behave. For instance, you could multi thread where specific threads periodically connect to the server. Why are you constrained to have only one call back function? Some more information about your application is needed before I can really give you helpful information.
Adam
National Instruments
Applications Engineer