Searched defs:sock (Results 1 - 3 of 3) sorted by relevance

/libmicro/
H A Dgetpeername.c53 static int sock = -1; variable
135 sock = accept(sock2, (struct sockaddr *)&adds, &size);
136 if (sock == -1) {
154 if (getpeername(sock, (struct sockaddr *)&adds, &size) == -1) {
H A Dgetsockname.c53 static int sock = -1; variable
70 sock = socket(AF_INET, SOCK_STREAM, 0);
71 if (sock == -1) {
76 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
95 if (bind(sock, (struct sockaddr *)&adds,
119 if (getsockname(sock, (struct sockaddr *)&adds, &size) == -1)
H A Dlisten.c54 static int sock = -1; variable
73 sock = socket(AF_INET, SOCK_STREAM, 0);
74 if (sock == -1) {
79 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
98 if (bind(sock, (struct sockaddr *)&adds,
119 if (listen(sock, 4) == -1)
121 if (listen(sock, 5) == -1)

Completed in 8 milliseconds