Although you are not using UDP, you can check out my UDP tutorial to get insight as to how this would be done. Here is the link: http://mina.apache.org/udp-tutorial.html
On 6/19/07, 李健 <[EMAIL PROTECTED]> wrote:
Hi, I'm developing my application with MINA1.1.0, It's working fine in ServerSide, But I'm confused by using IoHandler in ClientSide. I'll send R1 to the server and its response data is P1 and there will be R2-P2, R3-P3 etc. In the past time, I wrote code like this: byte[] request = ...; socketOutputStream.write(request); byte[] response = ... socketInputStream.read(response); ... // deal response data Now, for using MINA, I wrote code like this: ioConnector.bind(address, ioHandler); ... // get session session.write(request); The IoHandler which is binded to the ioConnector will deal response data, but I wanna to get the response data in my client class which sent the request data but not the IoHandler, so my client code can deal response data later after sent its request in one method process.(I'll use VMPipe sometimes, so i must using MINA IoConnector). who can give me some advice? can IoHandler pass the response data through the client class which sent the request data? Thanks.
-- ..Cheers Mark