K
Size: a a a
K
Б
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#define PORT 1488
int main() {
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons(PORT);
addr.sin_addr.s_addr = INADDR_ANY;
int sockfd = socket(AF_INET, SOCK_STREAM, 0); // family, type, proto
bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
listen(sockfd, 4096);
// code
close(sockfd);
return 0;
}
Б
K
Б
СК
Б
Б
K
СК
СК
K
Б
Б
K