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

Function inet_socket

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

Source from the content-addressed store, hash-verified

173#endif /* SAL_USING_POSIX */
174
175static int inet_socket(int domain, int type, int protocol)
176{
177#ifdef SAL_USING_POSIX
178 int socket;
179
180 socket = lwip_socket(domain, type, protocol);
181 if (socket >= 0)
182 {
183 struct lwip_sock *lwsock;
184
185 lwsock = lwip_tryget_socket(socket);
186 lwsock->conn->callback = event_callback;
187
188 rt_wqueue_init(&lwsock->wait_head);
189 }
190
191 return socket;
192#else
193 return lwip_socket(domain, type, protocol);
194#endif /* SAL_USING_POSIX */
195}
196
197static int inet_accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
198{

Callers

nothing calls this directly

Calls 3

rt_wqueue_initFunction · 0.85
lwip_socketFunction · 0.50
lwip_tryget_socketFunction · 0.50

Tested by

no test coverage detected