Don't have sample, but yeah this is what I would have done.

thanks
ashish

On Tue, Jan 12, 2010 at 4:25 AM, Christian Müller
<[email protected]> wrote:
> Hi Ashis,
>
> thanks for your reply.
> What is your recommendation, if I have to deal with multiple
> request/response cycles in one session (the UCP protocol is a
> request-response based protocol) and I have to provide a synchronous client
> API? I have "googled", "nabbled", "osdired", ... but I didn't found a
> solution for my "problem". :-(
>
> I would like to offer an API like this one:
>
> public class UCPClient {
>
>    private IoSession session;
>
>    // initialize the session, ...
>
>    public UCPResponse send(UCPRequest request) {
>        session.write(request);
>
>        // correlate response
>
>        return response;
>    }
> }
>
> Do you have any sample code for me?
>
> Regards,
> Christian
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Reply via email to