MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / inet_accept

Function inet_accept

components/net/sal/impl/af_inet_lwip.c:197–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197static int inet_accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
198{
199#ifdef SAL_USING_POSIX
200 int new_socket;
201
202 new_socket = lwip_accept(socket, addr, addrlen);
203 if (new_socket >= 0)
204 {
205 struct lwip_sock *lwsock;
206
207 lwsock = lwip_tryget_socket(new_socket);
208
209 rt_wqueue_init(&lwsock->wait_head);
210 }
211
212 return new_socket;
213#else
214 return lwip_accept(socket, addr, addrlen);
215#endif /* SAL_USING_POSIX */
216}
217
218static int inet_getsockname(int socket, struct sockaddr *name, socklen_t *namelen)
219{

Callers

nothing calls this directly

Calls 3

rt_wqueue_initFunction · 0.85
lwip_acceptFunction · 0.50
lwip_tryget_socketFunction · 0.50

Tested by

no test coverage detected