Sounds like a homework problem to me.
but its a confused homework problem. the word "sockets" typically is used to refer to an API method to reference TCP/UDP. Ports on the other hand are specified in the transport layer and are required to support multiple applications communicating to/from one computer.
but this is from memory and i may be wrong.