MCPcopy Create free account
hub / github.com/antirez/smallchat / sockaddr_in

Class sockaddr_in

chatlib.c:40–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38int createTCPServer(int port) {
39 int s, yes = 1;
40 struct sockaddr_in sa;
41
42 if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) return -1;
43 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)); // Best effort.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected