#include <iostream> using namespace std; #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> #include <malloc.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/ioctl.h> #include <stdarg.h> #include <fcntl.h> #include <fcntl.h> typedef struct pollfd FDLIST; int main() { int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); sockaddr_in ladd; ladd.sin_family = AF_INET; ladd.sin_port = htons(123); ladd.sin_addr.s_addr = 0; if(bind(fd, (sockaddr*)&ladd, sizeof(ladd)) == 0) { } cout << "Hello, World!" << endl; return 0; }