I guess you can do that in one task by creating one socket per port and use RTCS_selectall() to wait for events on at least one socket and then process them with accept() or recv().
See RTCS User's Guide in BSP source tree : doc/rtcs/MQXRTCSUG.pdf (also downloadable form Freescale's web)
There's some sample code in the doc.