16 lines
308 B
C++
16 lines
308 B
C++
|
|
# include <cerrno> // errno
|
|
# include <cstdio> // perror
|
|
# include <sys/socket.h> // socket, accept, listen, send, recv, bind, connect, setsockopt, getsockname
|
|
|
|
int main()
|
|
{
|
|
int server_fd;
|
|
if (server_fd = socket(domain, type, protocol)
|
|
{
|
|
perror("cannot create socket");
|
|
return 0;
|
|
}
|
|
return 0;
|
|
}
|