First page Back Continue Last page Overview Graphics
Question 3: Core Socket Functions
Refer the following and make it support IPv6
-
- int s;
- struct sockaddr_in sn;
- s = socket(AF_INET, SOCK_STREAM, 0);
- /* setup sn */
- if (connect(s, (struct sockaddr*)sn, sizeof(sn)) < 0)
- perror(“connect”);
- /* ... */
Notes: