mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish <paliwalash...@gmail.com>
Subject Re: Complex scenario: Can MINA solve my problem?
Date Mon, 31 Aug 2009 13:43:01 GMT
Hmm, have a look at the UDP server example.

Don't think this is a problem. AFAIK.

If I got it correctly, I would have something like this

Create  an NIO Acceptor (say A1)
Create a NIO Connector (say C1)
receive data on A1
send a command via C1
maintain that command state in some cache or hashtable
receive response via A1
in the IOHandler, get the data from cache/hashtable

Hope it helps. Correct me if I have got the problem incorrectly

thanks
ashish

On Mon, Aug 31, 2009 at 7:00 PM, Rodrigo Hernandez
Soares<rodhersoa@gmail.com> wrote:
> Hello.
> After all, please, forgive my english.
>
> I have this scenario:
>
> A server with a DatagramSocket, which receives periodic positioning messages
> (byte[]) from a gps tracker device (udp + gprs communication).
> Eventually i need to send commands (byte[]) to the device. To perform this
> task, i create a new DatagramSocket in the server. The problem is:
> the response to my command arrives through the other DatagramSocket, instead
> of arrives through the new Socket.
>
> That problem, in a multi-thread scenario, prevents the response to arrives
> to the correct sender (thread).
>
> Can MINA solve my problem?
>
> Thanks!
>



-- 
thanks
ashish

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

Mime
View raw message