Can netty bind to multiple ports?

Mike McGrady mmcgrady at topiatechnology.com
Sat Sep 5 16:30:01 EDT 2009


I see: thanks.  I don't know what others would say but why not write  
the code to do it and then offer it to Netty?

Sent from my iPhone

On Sep 5, 2009, at 7:02 AM, falconair <shahbazc at gmail.com> wrote:

>
> Given code like this:
> public static void main( String[] args )
>    {
>     ChannelFactory factory =
>     new NioServerSocketChannelFactory(
>     Executors.newCachedThreadPool(),
>     Executors.newCachedThreadPool());
>
>     ConnectionlessBootstrap bootstrap = new
> ConnectionlessBootstrap(factory);
>
>     bootstrap.setPipelineFactory(new FastMarketDataPipelineFactory());
>
>     //I want to do this
>     //bootstrap.bind(getMultiplePortsFromFile());//<==============
>     //I don't want to do this
>     bootstrap.bind(getSinglePort());
>    }
>
> I'd like to avoid writing one bootstrap for each port to avoid  
> writing more
> code, avoid performance penalty (if any), etc.
>
> On Sat, Sep 5, 2009 at 1:46 AM, Mike McGrady (via Nabble) <
> ml-user+56678-1543996500 at n2.nabble.com<ml-user 
> %2B56678-1543996500 at n2.nabble.com>
>> wrote:
>
>> I do not see what the problem is.  Certainly you can bind to any and
>> as many ports as you like.  How does your problem arise?
>>
>> Sent from my iPhone
>>
>> On Sep 4, 2009, at 7:38 PM, falconair <[hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3584040&i=0 
>> >>
>> wrote:
>>
>>>
>>> I need to listen to stock market data, published as UDP on a number
>>> of ports.
>>> I need to parse these messages and publish them to their respective
>>> jms
>>> topics.
>>>
>>> How can I listen to multiple ports?   bind equivalent function can
>>> take a
>>> set of internet addresses, I didn't see anything like that for
>>> Netty.  Did I
>>> miss something?
>>>
>>> Thanks
>>> --
>>> View this message in context:
>> http://n2.nabble.com/Can-netty-bind-to-multiple-ports-tp3583597p3583597.html
>>> Sent from the Netty User Group mailing list archive at Nabble.com.
>>> _______________________________________________
>>> netty-users mailing list
>>> [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3584040&i=1 
>>> >
>>> https://lists.jboss.org/mailman/listinfo/netty-users
>> _______________________________________________
>> netty-users mailing list
>> [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3584040&i=2 
>> >
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
>>
>> ------------------------------
>> View message @
>> http://n2.nabble.com/Can-netty-bind-to-multiple-ports-tp3583597p3584040.html
>> To unsubscribe from Can netty bind to multiple ports?, click here<  
>> (link removed) >.
>>
>>
>>
>
> -- 
> View this message in context: http://n2.nabble.com/Can-netty-bind-to-multiple-ports-tp3583597p3585284.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users


More information about the netty-users mailing list