MCPcopy Create free account
hub / github.com/ansyun/dpdk-ans / socket

Function socket

examples/https_server/ans_module.c:184–206  ·  view source on GitHub ↗

* @param * * @return * */

Source from the content-addressed store, hash-verified

182 *
183 */
184int socket(int domain, int type, int protocol)
185{
186 int rc;
187
188 ANS_FD_DEBUG("socket create start , domain %d, type %d \n", domain, type);
189
190 if ((inited == 0) || (AF_INET != domain) || (SOCK_STREAM != type && SOCK_DGRAM != type))
191 {
192 rc = real_socket(domain, type, protocol);
193 ANS_FD_DEBUG("linux socket fd %d \n", rc);
194
195 return rc;
196 }
197
198 assert(inited);
199 rc = anssock_socket(domain, type, protocol);
200
201 if(rc > 0)
202 rc += ANS_FD_BASE;
203
204 ANS_FD_DEBUG("ans socket fd %d \n", rc);
205 return rc;
206}
207
208/**
209 * @param

Callers 5

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
RunHttpsThreadFunction · 0.85
ans_kni_set_macFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected