def sys_send(self, sockfd, buf, count, flags):
try:
sock = self.files[sockfd]
except IndexError:
return -errno.EINVAL
if not isinstance(sock, Socket):
return -errno.ENOTSOCK
data = self.current.read_bytes(buf, count)
#XXX(yan): send(2) is currently a nop; we don't communicate yet
self.syscall_trace.append(("_send", sockfd, data))
return count
评论列表
文章目录