Lines Matching refs:sock

50     virtual Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const = 0;
52 virtual Status getsockopt(Fd sock, int level, int optname, void *optval,
55 virtual Status setsockopt(Fd sock, int level, int optname, const void* optval,
58 virtual Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
60 virtual Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
62 virtual StatusOr<ifreq> ioctl(Fd sock, unsigned long request, ifreq* ifr) const = 0;
74 virtual StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const sockaddr* dst,
77 virtual StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags, sockaddr* src,
117 StatusOr<SockaddrT> getsockname(Fd sock) const { in getsockname() argument
120 RETURN_IF_NOT_OK(getsockname(sock, asSockaddrPtr(&addr), &addrlen)); in getsockname()
125 Status getsockopt(Fd sock, int level, int optname, void* optval, socklen_t* optlen) const { in getsockopt() argument
126 return getsockopt(sock, level, optname, optval, optlen); in getsockopt()
130 Status setsockopt(Fd sock, int level, int optname, const SockoptT& opt) const { in setsockopt() argument
131 return setsockopt(sock, level, optname, &opt, sizeof(opt)); in setsockopt()
135 Status bind(Fd sock, const SockaddrT& addr) const { in bind() argument
136 return bind(sock, asSockaddrPtr(&addr), sizeof(addr)); in bind()
140 Status connect(Fd sock, const SockaddrT& addr) const { in connect() argument
141 return connect(sock, asSockaddrPtr(&addr), sizeof(addr)); in connect()
162 StatusOr<size_t> sendto(Fd sock, const Slice buf, int flags, const SockaddrT& dst) const { in sendto() argument
163 return sendto(sock, buf, flags, asSockaddrPtr(&dst), sizeof(dst)); in sendto()
167 StatusOr<Slice> recvfrom(Fd sock, const Slice dst, int flags) const { in recvfrom() argument
168 return recvfrom(sock, dst, flags, nullptr, nullptr); in recvfrom()
172 StatusOr<std::pair<Slice, SockaddrT>> recvfrom(Fd sock, const Slice dst, int flags) const { in recvfrom() argument
175 ASSIGN_OR_RETURN(auto used, recvfrom(sock, dst, flags, asSockaddrPtr(&addr), &addrlen)); in recvfrom()