This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00000001000010f0 _main: | |
1000010f0: 55 pushq %rbp | |
1000010f1: 48 89 e5 movq %rsp, %rbp | |
1000010f4: 48 89 f2 movq %rsi, %rdx | |
1000010f7: 48 63 f7 movslq %edi, %rsi | |
1000010fa: 48 8d 3d 8f ff ff ff leaq -113(%rip), %rdi | |
100001101: e8 4a 05 00 00 callq 1354 <__ZN3std2rt10lang_start17h25bc31422b914902E> | |
100001106: 5d popq %rbp | |
100001107: c3 retq | |
100001108: 90 nop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/socket.h> | |
ssize_t send(int sockfd, const void *buf, size_t len, int flags); | |
ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, | |
const struct sockaddr *dest_addr, socklen_t addrlen); | |
ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
ssize_t write(int fd, const void *buf, size_t count); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//net/net.go l300 | |
type PacketConn interface { | |
ReadFrom(p []byte) (n int, addr Addr, err error) | |
WriteTo(p []byte, addr Addr) (n int, err error) | |
Close() error | |
LocalAddr() Addr | |
SetDeadline(t time.Time) error | |
SetReadDeadline(t time.Time) error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//net/net.go l300 | |
type PacketConn interface { | |
ReadFrom(p []byte) (n int, addr Addr, err error) | |
WriteTo(p []byte, addr Addr) (n int, err error) | |
Close() error | |
LocalAddr() Addr | |
SetDeadline(t time.Time) error | |
SetReadDeadline(t time.Time) error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//net/net.go l300 | |
type PacketConn interface { | |
ReadFrom(p []byte) (n int, addr Addr, err error) | |
WriteTo(p []byte, addr Addr) (n int, err error) | |
Close() error | |
LocalAddr() Addr | |
SetDeadline(t time.Time) error | |
SetReadDeadline(t time.Time) error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A RawConn is a raw network connection. syscall/net.go | |
type RawConn interface { | |
Control(f func(fd uintptr)) error | |
Read(f func(fd uintptr) (done bool)) error | |
Write(f func(fd uintptr) (done bool)) error | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conn is implemented by some types in the net and os packages to provide | |
// access to the underlying file descriptor or handle. | |
type Conn interface { | |
// SyscallConn returns a raw network connection. | |
SyscallConn() (RawConn, error) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// net.conn struct file: net/net.go l:164 | |
type conn struct { | |
fd *netFD | |
} | |
func (c *conn) ok() bool { return c != nil && c.fd != nil } | |
// Implementation of the Conn interface. | |
// Read implements the Conn Read method. | |
func (c *conn) Read(b []byte) (int, error) {} | |
// Write implements the Conn Write method. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int open(const char *pathname, int flags); | |
int open(const char *pathname, int flags, mode_t mode); | |
int creat(const char *pathname, mode_t mode); | |
int openat(int dirfd, const char *pathname, int flags); |
NewerOlder