File: socket_bind6_reuse.c

package info (click to toggle)
libowfat 0.27-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,412 kB
  • ctags: 1,147
  • sloc: ansic: 12,294; makefile: 42
file content (12 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#include <sys/types.h>
#ifndef __MINGW32__
#include <sys/socket.h>
#endif
#include "socket.h"
#include "windoze.h"

int socket_bind6_reuse(int s,const char *ip,uint16 port,uint32 scope_id) {
  int one=1;
  setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&one,sizeof one);
  return winsock2errno(socket_bind6(s,ip,port,scope_id));
}