Fixed boneheaded mistake, where I set REUSEADDR for UDP instead of TCP
This commit is contained in:
@@ -53,7 +53,7 @@ SOCKET create_socket(int network, char transport) {
|
||||
int newSock = socket(domain,type,0);
|
||||
|
||||
/* Set REUSEADDR flag for TCP, allowing program to be run twice */
|
||||
if (transport == ES_UDP) {
|
||||
if (transport == ES_TCP) {
|
||||
int set_opt = 1;
|
||||
setsockopt(newSock, SOL_SOCKET, SO_REUSEADDR, (char *)&set_opt, sizeof(set_opt));
|
||||
}
|
||||
|
Reference in New Issue
Block a user