UDP tutorial: DatagramAcceptor.setLocalAddress()

View: New views
2 Messages — Rating Filter:   Alert me  

UDP tutorial: DatagramAcceptor.setLocalAddress()

by Hez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
The MINA UDP tutorial <http://mina.apache.org/udp-tutorial.html> says:

DatagramAcceptor acceptor = new DatagramAcceptor();
acceptor.setLocalAddress(new InetSocketAddress(PORT));


But it seems that the setLocalAddress() is not available in MINA 2.0-M3 ?


--

Hez

Re: UDP tutorial: DatagramAcceptor.setLocalAddress()

by Edwin Lee-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i think you've already found an answer to this.

Anyway,

You can either use setDefaultLocalAddress,

or, when binding, just use the overload of the bind method which takes in a
SocketAddress.



HTH,
Edwin



--- hezjing <hezjing@...> wrote:

> Hi
> The MINA UDP tutorial <http://mina.apache.org/udp-tutorial.html> says:
>
> DatagramAcceptor acceptor = new DatagramAcceptor();
> acceptor.setLocalAddress(new InetSocketAddress(PORT));
>
>
> But it seems that the setLocalAddress() is not available in MINA 2.0-M3 ?



      New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/

LightInTheBox - Buy quality products at wholesale price!