Creating TCP and UDP channel using nio