adding scala support for TCP/UDP NIOApplications