004 Linux Network ProgrammingIssues, queries and suggestions related to Linux, Network, Linux Programming, Network Programming, System Programming, Sockets, Threads,
FTP based Client Server project using sockets and threads. » 004.03.Introduction-to-Sockets
1. Describe the difference between connection-oriented and connectionless communication. How does it affect network application design?Explain how connection-based (e.g., TCP) vs connectionless (e.g.…
2. What are sockets in network programming, and how are they used to facilitate communication between systems?Explain: Basic understanding of socket programming concepts.
3. Explain the purpose of the `bind()` system call in socket programming. In which scenarios would a client application need to use `bind()`?Focus: Knowledge of `bind()` in both server and client con…
4. How does the `select()` function help manage multiple socket connections in a server?Focus: Multiplexing, non-blocking I/O, handling multiple clients in a scalable server.
5. What are the key differences between `send()` and `sendto()`? When would you use each in network programming?Focus: Usage of `send()` for connection-oriented (TCP) and `sendto()` for connectionles…
6. In the context of raw sockets, why might you need to use them, and what are the potential risks associated with raw socket programming?Focus: Low-level network access using raw sockets and the ass…
7. What is the purpose of the `recvfrom()` system call, and how is it different from `recv()`?Focus: Understanding of the different types of socket calls, particularly for datagram (UDP) vs stream (T…
8. Describe the process of converting an IP address from human-readable format to binary format and vice versa. Which functions in Linux are used for this conversion?Focus: Use of `inet_pton()` and `…
9. What are some common network debugging tools available in Linux? How would you use them to troubleshoot network issues?Focus: Knowledge of tools like `tcpdump`, `netstat`, `ss`, `traceroute`, `pin…
10. Explain what a blocking socket is. How can you make a socket non-blocking, and why might you need to do that?Focus: Differentiation between blocking and non-blocking sockets and how to manage I/O…
11. In Linux, what is the purpose of the `fcntl()` system call, and how can it be used in network programming?Focus: Use of `fcntl()` for setting socket attributes, especially non-blocking modes.
12. How would you handle errors in a socket-based program? What are some common socket error codes, and how do you check for them?Focus: Error-handling mechanisms using `errno`, `perror()`, and `stre…
13. What is the purpose of the `listen()` system call, and what role does the `backlog` parameter play in server socket programming?Focus: Understanding how to manage incoming connections and what th…
14. Describe the role of the `accept()` system call in a server application. How does it differ from `connect()` on the client side?Focus: Deep understanding of how server-side `accept()` and client-…
15. What is a UNIX domain socket, and how does it differ from an Internet domain socket? When would you use a UNIX domain socket instead of an IP-based socket?Focus: Local inter-process communication…
16. What is the role of `getaddrinfo()` in network programming? Why is it preferred over older functions like `gethostbyname()`?Focus: Modern address resolution techniques and their advantages, inclu…
17. How would you implement a basic client-server model where the server handles multiple clients simultaneously? What methods would you use for scalability?Focus: Multiplexing techniques (`select()`…
18. Explain the difference between a multicast and a broadcast in network programming. How would you implement each using sockets?Focus: Difference in scope and usage between broadcasting (sending to…
19. What are some strategies for improving the performance of a networked application? How would you optimize socket communication in high-performance systems?Focus: Techniques like reducing latency …
20. What is the purpose of setting socket options with `setsockopt()`? Can you provide examples of commonly used socket options for tuning network performance or behavior?Focus: Use of `setsockopt()`…