Apache Directory Project - [mina] DatagramAcceptor RFE

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > October 2005 > [mina] DatagramAcceptor RFE





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [mina] DatagramAcceptor RFE
Alban Peignier

2005-10-19, 5:46 pm

Hello,

We're working on a Java peer-to-peer API with NAT traversal support.
We're thinking about using the (great) Mina API to control the transport
layer.

http://wiki.tryphon.org/Kolaka_P2PNet
http://wiki.tryphon.org/Kolaka_P2PNet#NAT_Traversal

Everything is fine for us, except a missing feature in the
DatagramAcceptor. Indeed we need to artificially send a response paquet
(when needed) from a DatagramAcceptor. With the JDK APIs, we have the
send methods to perform it. The DatagramAcceptor (logically) doesn't
provide a such thing. But there is no way to extend the DatagramAcceptor
to make it possible.

Can we find a way together to make it possible ?

Regards
--
Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>
http://people.tryphon.org/~alban


Trustin Lee

2005-10-19, 5:46 pm

Hello Alban,

2005/10/15, Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>:
>
> We're working on a Java peer-to-peer API with NAT traversal support.
> We're thinking about using the (great) Mina API to control the transport
> layer.
>
> http://wiki.tryphon.org/Kolaka_P2PNet
> http://wiki.tryphon.org/Kolaka_P2PNet#NAT_Traversal
>
> Everything is fine for us, except a missing feature in the
> DatagramAcceptor. Indeed we need to artificially send a response paquet
> (when needed) from a DatagramAcceptor. With the JDK APIs, we have the
> send methods to perform it. The DatagramAcceptor (logically) doesn't
> provide a such thing. But there is no way to extend the DatagramAcceptor
> to make it possible.
>
> Can we find a way together to make it possible ?



You can use DatagramConnector to send message first before the remote peer
send one.

IoConnector connector = new DatagramConnector();
IoSession session = connector.connect( ... );
session.write(...);

Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Alban Peignier

2005-10-19, 5:46 pm

On Sun, 2005-10-16 at 09:20 +0900, Trustin Lee wrote:

> You can use DatagramConnector to send message first before the remote
> peer send one.
>
> IoConnector connector = new DatagramConnector();
> IoSession session = connector.connect( ... );
> session.write(...);


But the sent message must have the same source port than the
DatagramAcceptor .. which is already bound. The only way I see is using
the Datagram(Channel|Socket) of the DatagramAcceptor. Is it possible
that the DatagramAdaptor provides a DatagramConnector to create
IOSessions from the same channel/socket ? It may be too complex, in our
use case, we only need to send a packet ..
--
Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>
http://people.tryphon.org/~alban


Matteo Merli

2005-10-19, 5:46 pm

2005/10/16, Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>:
> But the sent message must have the same source port than the
> DatagramAcceptor .. which is already bound. The only way I see is using
> the Datagram(Channel|Socket) of the DatagramAcceptor. Is it possible
> that the DatagramAdaptor provides a DatagramConnector to create
> IOSessions from the same channel/socket ? It may be too complex, in our
> use case, we only need to send a packet ..


I have exactly the same kind of problem but haven't found any solutions yet=
...
I need to listen from several clients on the same UDP port and be able
to send packets to clients from this port..

--
Matteo Merli
<matteo.merli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Trustin Lee

2005-10-19, 5:46 pm

Hi Matteo and Alban,

I understood your request. I'll put this issue to JIRA and make MINA
0.9capable of sending datagram packet to arbitrary address.

Thanks for the heads up,
Trustin

2005/10/16, Matteo Merli <matteo.merli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
> 2005/10/16, Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>:
>
> I have exactly the same kind of problem but haven't found any solutions
> yet..
> I need to listen from several clients on the same UDP port and be able
> to send packets to clients from this port..
>
> --
> Matteo Merli
> <matteo.merli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>




--
what we call human nature is actually human habit
--
http://gleamynode.net/

Trustin Lee

2005-10-19, 5:46 pm

I put the JIRA issue here:

http://issues.apache.org/jira/browse/DIRMINA-96

Please watch this issue and let me know any idea you've got by commenting
there.

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Alban Peignier

2005-10-19, 5:46 pm

Thanks :o)
--
Alban Peignier <alban.peignier-GANU6spQydw@public.gmane.org>
http://people.tryphon.org/~alban


Trustin Lee

2005-10-25, 7:45 am

This issue has been closed long ago:

http://issues.apache.org/jira/browse/DIRMINA-96

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com