*/
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netdb.h>
#endif
+#ifndef WIN32
#include <unistd.h>
+#endif
#include <time.h>
#include <errno.h>
-
#include "ministun.h"
/*---------------------------------------------------------------------*/
int rc = -3;
if(bind(sock, (struct sockaddr*)&client, sizeof(client)) >= 0)
rc = StunRequest2(sock, &server, mapped);
-
+#ifndef WIN32
close(sock);
+#else
+ closesocket(sock);
+#endif
return rc;
} // StunRequest