• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifdef OHOS_SOCKET_HOOK_ENABLE
2 #include "musl_socket.h"
3 #include <sys/socket.h>
4 #include "common_def.h"
5 #include "musl_socket_preinit_common.h"
6 
socket(int domain,int type,int protocol)7 int socket(int domain, int type, int protocol)
8 {
9 	volatile const struct SocketDispatchType* dispatch = get_socket_dispatch();
10 	if (__predict_false(dispatch != NULL)) {
11 		int ret = dispatch->socket(domain, type, protocol);
12 		return ret;
13 	}
14 	int result = MuslSocket(socket)(domain, type, protocol);
15 	return result;
16 }
17 
18 #endif