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

Function connect

components/net/sal/socket/net_sockets.c:343–347  ·  view source on GitHub ↗

* @brief Initiates a connection on a socket. * * This function connects the socket specified by 's' to the server address specified by 'name'. * The socket must have been created with 'socket()' and, for some types of sockets, may need * to be bound to a local address with 'bind()' before calling 'connect()'. * * @param s The file descriptor of the socket to connect. * @param name

Source from the content-addressed store, hash-verified

341 * @see close()/closesocket() Closes the socket when done.
342 */
343int connect(int s, const struct sockaddr *name, socklen_t namelen)
344{
345 int socket = dfs_net_getsocket(s);
346 return sal_connect(socket, name, namelen);
347}
348RTM_EXPORT(connect);
349
350/**

Callers 6

sys_connectFunction · 0.85
file_mode_network_initFunction · 0.85
tcpclientFunction · 0.85
win_connectFunction · 0.85
tcpclientFunction · 0.85
tcp_senddataFunction · 0.85

Calls 2

dfs_net_getsocketFunction · 0.85
sal_connectFunction · 0.85

Tested by

no test coverage detected