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

Function dfs_net_write

components/net/sal/dfs_net/dfs_net.c:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69static ssize_t dfs_net_write(struct dfs_file *file, const void *buf, size_t count, off_t *pos)
70#else
71static ssize_t dfs_net_write(struct dfs_file *file, const void *buf, size_t count)
72#endif
73{
74 int ret;
75 int socket = (int)(size_t)file->vnode->data;
76
77 ret = sal_sendto(socket, buf, count, 0, NULL, 0);
78 if (ret < 0)
79 {
80 ret = rt_get_errno();
81 return (ret > 0) ? (-ret) : ret;
82 }
83
84 return ret;
85}
86
87static int dfs_net_close(struct dfs_file* file)
88{

Callers

nothing calls this directly

Calls 2

sal_sendtoFunction · 0.85
rt_get_errnoFunction · 0.85

Tested by

no test coverage detected