move static constants out of ip6.h.
This commit is contained in:
11
socket/socket_connected.c
Normal file
11
socket/socket_connected.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include "socket.h"
|
||||
|
||||
int socket_connected(int s) {
|
||||
struct sockaddr si;
|
||||
socklen_t sl=sizeof si;
|
||||
if (getpeername(s,&si,&sl))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user