Answer:
To answer this question, focus on your projects where you have used socket and I would recommend to make a note of all socket used situations. Some times in interview, on the fly we may not able to recollect many situations. If you quickly states many situations it gets interviewer, a confidence on your knowledge.
If you didn’t get a chance to work on socket. Tell them clearly you have not used in the through project. And you are familiar with the concepts and may explain some situation where you can use socket or it has been used e.g. some application level protocols like FTP(for file transferring over network), SMTP and POP3 for email applications use sockets to establish connection between client and server for exchanging data.
I have used socket communication for many reasons and placing here some of them just to get an idea.
IPC : Inter process communication– had to send multiple commands during the execution from the GUI application resides on one machine to other server machine via network or USB and get the response back. For example peripherals status, ID etc.
IP Discovery: Had requirement to find IP address of all specific machines and connect to it in our local network that were performing specific tasks.