Protocol Options After a socket is created, we can tune various options for the different protocols running under that socket. Use setsockopt() to change socket and protocol options. Example: int s = socket(PF_INET, SOCK_STREAM, 0); /* this is the parameter that 'SO_REUSEADDR' */ /* requires. different options require different */ /* parameter types. */ int so_on = 1; /* make the system allow address re-usage. */ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*)&set_on, sizeof(set_on));