Exemple #1
0
static ssize_t
soc_read(struct _reent *r,
         int           fd,
         char          *ptr,
         size_t        len)
{
	Handle sockfd = *(Handle*)fd;
	return soc_recvfrom(sockfd, ptr, len, 0, NULL, 0);
}
Exemple #2
0
ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)
{
	sockfd = soc_get_fd(sockfd);
	if(sockfd < 0) {
		errno = -sockfd;
		return -1;
	}

	return soc_recvfrom(sockfd, buf, len, flags, src_addr, addrlen);
}
Exemple #3
0
ssize_t soc_recv(int sockfd, void *buf, size_t len, int flags)
{
    return soc_recvfrom(sockfd, buf, len, flags, NULL, 0);
}