Documentation ¶
Index ¶
- Constants
- func ErrName(err Errno) *c.Char
- func ErrNameR(err Errno, buf *c.Char, bufLen uintptr) *c.Char
- func Freeaddrinfo(addrInfo *net.AddrInfo)
- func FsAccess(loop *Loop, req *Fs, path *c.Char, flags c.Int, cb FsCb) c.Int
- func FsChmod(loop *Loop, req *Fs, path *c.Char, mode c.Int, cb FsCb) c.Int
- func FsChown(loop *Loop, req *Fs, path *c.Char, uid c.Int, gid c.Int, cb FsCb) c.Int
- func FsClose(loop *Loop, req *Fs, file File, cb FsCb) c.Int
- func FsCloseDir(loop *Loop, req *Fs) c.Int
- func FsCopyfile(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, flags c.Int, cb FsCb) c.Int
- func FsEventInit(loop *Loop, handle *FsEvent) c.Int
- func FsFchmod(loop *Loop, req *Fs, file File, mode c.Int, cb FsCb) c.Int
- func FsFchown(loop *Loop, req *Fs, file File, uid c.Int, gid c.Int, cb FsCb) c.Int
- func FsFdatasync(loop *Loop, req *Fs, file File, cb FsCb) c.Int
- func FsFstat(loop *Loop, req *Fs, file File, cb FsCb) c.Int
- func FsFsync(loop *Loop, req *Fs, file File, cb FsCb) c.Int
- func FsFtruncate(loop *Loop, req *Fs, file File, offset c.LongLong, cb FsCb) c.Int
- func FsFutime(loop *Loop, req *Fs, file File, atime c.Int, mtime c.Int, cb FsCb) c.Int
- func FsLchown(loop *Loop, req *Fs, path *c.Char, uid c.Int, gid c.Int, cb FsCb) c.Int
- func FsLink(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, cb FsCb) c.Int
- func FsLstat(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsLutime(loop *Loop, req *Fs, path *c.Char, atime c.Int, mtime c.Int, cb FsCb) c.Int
- func FsMkStemp(loop *Loop, req *Fs, tpl *c.Char, cb FsCb) c.Int
- func FsMkdir(loop *Loop, req *Fs, path *c.Char, mode c.Int, cb FsCb) c.Int
- func FsMkdtemp(loop *Loop, req *Fs, tpl *c.Char, cb FsCb) c.Int
- func FsOpen(loop *Loop, req *Fs, path *c.Char, flags c.Int, mode c.Int, cb FsCb) c.Int
- func FsOpenDir(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsPollInit(loop *Loop, handle *FsPoll) c.Int
- func FsRead(loop *Loop, req *Fs, file File, bufs *Buf, nbufs c.Uint, offset c.LongLong, ...) c.Int
- func FsReaddir(loop *Loop, req *Fs, dir c.Int, cb FsCb) c.Int
- func FsReadlink(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsRealpath(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsRename(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, cb FsCb) c.Int
- func FsRmdir(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsScandir(loop *Loop, req *Fs, path *c.Char, flags c.Int, cb FsCb) c.Int
- func FsScandirNext(req *Fs, ent *Dirent) c.Int
- func FsSendfile(loop *Loop, req *Fs, outFd c.Int, inFd c.Int, inOffset c.LongLong, ...) c.Int
- func FsStat(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsStatfs(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsSymlink(loop *Loop, req *Fs, path *c.Char, newPath *c.Char, flags c.Int, cb FsCb) c.Int
- func FsUnlink(loop *Loop, req *Fs, path *c.Char, cb FsCb) c.Int
- func FsUtime(loop *Loop, req *Fs, path *c.Char, atime c.Int, mtime c.Int, cb FsCb) c.Int
- func FsWrite(loop *Loop, req *Fs, file File, bufs *Buf, nbufs c.Uint, offset c.LongLong, ...) c.Int
- func Getaddrinfo(loop *Loop, req *GetAddrInfo, getaddrinfoCb GetaddrinfoCb, node *c.Char, ...) c.Int
- func Getnameinfo(loop *Loop, req *GetNameInfo, getnameinfoCb GetnameinfoCb, addr *net.SockAddr, ...) c.Int
- func HandleSize(handleType HandleType) uintptr
- func HandleTypeName(handleType HandleType) *c.Char
- func InetNtop(af c.Int, src c.Pointer, dst *c.Char, size uintptr) c.Int
- func InetPton(af c.Int, src *c.Char, dst c.Pointer) c.Int
- func InitCheck(loop *Loop, Check *Check) c.Int
- func InitIdle(loop *Loop, idle *Idle) c.Int
- func InitTcp(loop *Loop, tcp *Tcp) c.Int
- func InitTcpEx(loop *Loop, tcp *Tcp, flags c.Uint) c.Int
- func InitTimer(loop *Loop, timer *Timer) c.Int
- func InitUdp(loop *Loop, udp *Udp) c.Int
- func InitUdpEx(loop *Loop, udp *Udp, flags c.Uint) c.Int
- func Ip4Addr(ip *c.Char, port c.Int, addr *net.SockaddrIn) c.Int
- func Ip4Name(src *net.SockaddrIn, dst *c.Char, size uintptr) c.Int
- func Ip6Addr(ip *c.Char, port c.Int, addr *net.SockaddrIn6) c.Int
- func Ip6Name(src *net.SockaddrIn6, dst *c.Char, size uintptr) c.Int
- func IpName(src *net.SockAddr, dst *c.Char, size uintptr) c.Int
- func LibraryShutdown()
- func LoopSize() uintptr
- func Pipe(fds [2]File, readFlags c.Int, writeFlags c.Int) c.Int
- func PollInit(loop *Loop, handle *Poll, fd OsFd) c.Int
- func PollInitSocket(loop *Loop, handle *Poll, socket c.Int) c.Int
- func QueueWork(loop *Loop, req *Work, workCb WorkCb, afterWorkCb AfterWorkCb) c.Int
- func ReplaceAllocator(mallocFunc MallocFunc, reallocFunc ReallocFunc, callocFunc CallocFunc, ...) c.Int
- func ReqSize(reqType ReqType) uintptr
- func Send(req *UdpSend, udp *Udp, bufs *Buf, nbufs c.Uint, addr *net.SockAddr, ...) c.Int
- func SignalInit(loop *Loop, handle *Signal) c.Int
- func Socketpair(_type c.Int, protocol c.Int, socketVector [2]OsSock, flag0 c.Int, flag1 c.Int) c.Int
- func StreamShutdown(shutdown *Shutdown, stream *Stream, shutdownCb ShutdownCb) c.Int
- func Strerror(err Errno) *c.Char
- func StrerrorR(err Errno, buf *c.Char, bufLen uintptr) *c.Char
- func TcpConnect(req *Connect, tcp *Tcp, addr *net.SockAddr, connectCb ConnectCb) c.Int
- func ThreadEqual(t1 *Thread, t2 *Thread) c.Int
- func ThreadGetCPU() c.Int
- func TypeName(reqType ReqType) *c.Char
- func Version() c.Uint
- func VersionString() *c.Char
- type AfterWorkCb
- type AllocCb
- type Async
- type AsyncCb
- type Buf
- type CallocFunc
- type Check
- type CheckCb
- type CloseCb
- type Connect
- type ConnectCb
- type ConnectionCb
- type Dirent
- type DirentType
- type Errno
- type File
- type FreeFunc
- type Fs
- type FsCb
- type FsEvent
- type FsEventCb
- type FsPoll
- type FsPollCb
- type FsType
- type GetAddrInfo
- type GetNameInfo
- type GetaddrinfoCb
- type GetnameinfoCb
- type Handle
- func (handle *Handle) Close(closeCb CloseCb)
- func (handle *Handle) Fileno(fd *OsFd) c.Int
- func (handle *Handle) GetData() c.Pointer
- func (handle *Handle) GetLoop() *Loop
- func (handle *Handle) GetType() HandleType
- func (handle *Handle) HasRef() c.Int
- func (handle *Handle) IsActive() c.Int
- func (handle *Handle) IsClosing() c.Int
- func (handle *Handle) IsReadable() c.Int
- func (handle *Handle) IsWritable() c.Int
- func (handle *Handle) RecvBufferSize(value *c.Int) c.Int
- func (handle *Handle) Ref()
- func (handle *Handle) SendBufferSize(value *c.Int) c.Int
- func (handle *Handle) SetData(data c.Pointer)
- func (handle *Handle) Unref()
- type HandleType
- type Idle
- type IdleCb
- type Loop
- func (loop *Loop) Alive() c.Int
- func (loop *Loop) Async(a *Async, cb AsyncCb) c.Int
- func (loop *Loop) BackendFd() c.Int
- func (loop *Loop) BackendTimeout() c.Int
- func (loop *Loop) Close() c.Int
- func (loop *Loop) Configure(option LoopOption, arg c.Int) c.Int
- func (loop *Loop) Delete() c.Int
- func (loop *Loop) Fork() c.Int
- func (loop *Loop) GetData() c.Pointer
- func (loop *Loop) Init() c.Int
- func (loop *Loop) Now() c.UlongLong
- func (loop *Loop) Run(mode RunMode) c.Int
- func (loop *Loop) SetData(data c.Pointer)
- func (loop *Loop) Stop()
- func (loop *Loop) UpdateTime()
- func (loop *Loop) Walk(walkCb WalkCb, arg c.Pointer)
- type LoopOption
- type MallocFunc
- type Membership
- type OsFd
- type OsSock
- type Poll
- type PollCb
- type PollEvent
- type ReadCb
- type ReallocFunc
- type Req
- type ReqType
- type RunMode
- type Shutdown
- type ShutdownCb
- type Signal
- type SignalCb
- type Stat
- type Stream
- func (server *Stream) Accept(client *Stream) c.Int
- func (stream *Stream) GetWriteQueueSize() uintptr
- func (stream *Stream) IsReadable() c.Int
- func (stream *Stream) IsWritable() c.Int
- func (stream *Stream) Listen(backlog c.Int, connectionCb ConnectionCb) c.Int
- func (stream *Stream) SetBlocking(blocking c.Int) c.Int
- func (stream *Stream) StartRead(allocCb AllocCb, readCb ReadCb) c.Int
- func (stream *Stream) StopRead() c.Int
- func (stream *Stream) TryWrite(bufs *Buf, nbufs c.Uint) c.Int
- func (stream *Stream) TryWrite2(bufs *Buf, nbufs c.Uint, sendStream *Stream) c.Int
- type Tcp
- func (tcp *Tcp) Bind(addr *net.SockAddr, flags c.Uint) c.Int
- func (tcp *Tcp) CloseReset(closeCb CloseCb) c.Int
- func (tcp *Tcp) GetIoWatcherFd() c.Int
- func (tcp *Tcp) Getpeername(name *net.SockAddr, nameLen *c.Int) c.Int
- func (tcp *Tcp) Getsockname(name *net.SockAddr, nameLen *c.Int) c.Int
- func (tcp *Tcp) KeepAlive(enable c.Int, delay c.Uint) c.Int
- func (tcp *Tcp) Nodelay(enable c.Int) c.Int
- func (tcp *Tcp) Open(sock OsSock) c.Int
- func (tcp *Tcp) SimultaneousAccepts(enable c.Int) c.Int
- type TcpFlags
- type Thread
- func (t *Thread) Create(entry ThreadCb, arg c.Pointer) c.Int
- func (t *Thread) CreateEx(entry ThreadCb, params *ThreadOptions, arg c.Pointer) c.Int
- func (t *Thread) GetAffinity(cpuMask *c.Char, maskSize uintptr) c.Int
- func (t *Thread) Join() c.Int
- func (t *Thread) SetAffinity(cpuMask *c.Char, oldMask *c.Char, maskSize uintptr) c.Int
- type ThreadCb
- type ThreadOptions
- type Timer
- type TimerCb
- type Udp
- func (udp *Udp) Bind(addr *net.SockAddr, flags c.Uint) c.Int
- func (udp *Udp) Connect(addr *net.SockAddr) c.Int
- func (udp *Udp) GetSendQueueCount() uintptr
- func (udp *Udp) GetSendQueueSize() uintptr
- func (udp *Udp) Getpeername(name *net.SockAddr, nameLen *c.Int) c.Int
- func (udp *Udp) Getsockname(name *net.SockAddr, nameLen *c.Int) c.Int
- func (udp *Udp) Open(sock OsSock) c.Int
- func (udp *Udp) SetBroadcast(on c.Int) c.Int
- func (udp *Udp) SetMembership(multicastAddr *c.Char, interfaceAddr *c.Char, membership Membership) c.Int
- func (udp *Udp) SetMulticastInterface(interfaceAddr *c.Char) c.Int
- func (udp *Udp) SetMulticastLoop(on c.Int) c.Int
- func (udp *Udp) SetMulticastTTL(ttl c.Int) c.Int
- func (udp *Udp) SetTTL(ttl c.Int) c.Int
- func (udp *Udp) SourceMembership(multicastAddr *c.Char, interfaceAddr *c.Char, sourceAddr *c.Char, ...) c.Int
- func (udp *Udp) StartRecv(allocCb AllocCb, recvCb UdpRecvCb) c.Int
- func (udp *Udp) StopRecv() c.Int
- func (udp *Udp) TrySend(bufs *Buf, nbufs c.Uint, addr *net.SockAddr) c.Int
- func (udp *Udp) UsingRecvmmsg() c.Int
- type UdpFlags
- type UdpRecvCb
- type UdpSend
- type UdpSendCb
- type WalkCb
- type Work
- type WorkCb
- type Write
- type WriteCb
Constants ¶
const ( E2BIG = Errno(syscall.E2BIG) EACCES = Errno(syscall.EACCES) EADDRINUSE = Errno(syscall.EADDRINUSE) EADDRNOTAVAIL = Errno(syscall.EADDRNOTAVAIL) EAFNOSUPPORT = Errno(syscall.EAFNOSUPPORT) EAGAIN = Errno(syscall.EAGAIN) EALREADY = Errno(syscall.EALREADY) EBADF = Errno(syscall.EBADF) EBUSY = Errno(syscall.EBUSY) ECANCELED = Errno(syscall.ECANCELED) ECONNABORTED = Errno(syscall.ECONNABORTED) ECONNREFUSED = Errno(syscall.ECONNREFUSED) ECONNRESET = Errno(syscall.ECONNRESET) EDESTADDRREQ = Errno(syscall.EDESTADDRREQ) EEXIST = Errno(syscall.EEXIST) EFAULT = Errno(syscall.EFAULT) EFBIG = Errno(syscall.EFBIG) EHOSTUNREACH = Errno(syscall.EHOSTUNREACH) EINTR = Errno(syscall.EINTR) EINVAL = Errno(syscall.EINVAL) EIO = Errno(syscall.EIO) EISCONN = Errno(syscall.EISCONN) EISDIR = Errno(syscall.EISDIR) ELOOP = Errno(syscall.ELOOP) EMFILE = Errno(syscall.EMFILE) EMSGSIZE = Errno(syscall.EMSGSIZE) ENAMETOOLONG = Errno(syscall.ENAMETOOLONG) ENETDOWN = Errno(syscall.ENETDOWN) ENETUNREACH = Errno(syscall.ENETUNREACH) ENFILE = Errno(syscall.ENFILE) ENOBUFS = Errno(syscall.ENOBUFS) ENODEV = Errno(syscall.ENODEV) ENOENT = Errno(syscall.ENOENT) ENOMEM = Errno(syscall.ENOMEM) ENOPROTOOPT = Errno(syscall.ENOPROTOOPT) ENOSPC = Errno(syscall.ENOSPC) ENOSYS = Errno(syscall.ENOSYS) ENOTCONN = Errno(syscall.ENOTCONN) ENOTDIR = Errno(syscall.ENOTDIR) ENOTEMPTY = Errno(syscall.ENOTEMPTY) ENOTSOCK = Errno(syscall.ENOTSOCK) ENOTSUP = Errno(syscall.ENOTSUP) EOVERFLOW = Errno(syscall.EOVERFLOW) EPERM = Errno(syscall.EPERM) EPIPE = Errno(syscall.EPIPE) EPROTO = Errno(syscall.EPROTO) EPROTONOSUPPORT = Errno(syscall.EPROTONOSUPPORT) EPROTOTYPE = Errno(syscall.EPROTOTYPE) ERANGE = Errno(syscall.ERANGE) EROFS = Errno(syscall.EROFS) ESHUTDOWN = Errno(syscall.ESHUTDOWN) ESPIPE = Errno(syscall.ESPIPE) ESRCH = Errno(syscall.ESRCH) ETIMEDOUT = Errno(syscall.ETIMEDOUT) ETXTBSY = Errno(syscall.ETXTBSY) EXDEV = Errno(syscall.EXDEV) ENXIO = Errno(syscall.ENXIO) EMLINK = Errno(syscall.EMLINK) EHOSTDOWN = Errno(syscall.EHOSTDOWN) ENOTTY = Errno(syscall.ENOTTY) //EFTYPE = Errno(syscall.EFTYPE) EILSEQ = Errno(syscall.EILSEQ) ESOCKTNOSUPPORT = Errno(syscall.ESOCKTNOSUPPORT) )
const ( EAI_ADDRFAMILY = Errno(net.EAI_ADDRFAMILY) EAI_AGAIN = Errno(net.EAI_AGAIN) EAI_BADFLAGS = Errno(net.EAI_BADFLAGS) EAI_BADHINTS = Errno(net.EAI_BADHINTS) EAI_FAIL = Errno(net.EAI_FAIL) EAI_FAMILY = Errno(net.EAI_FAMILY) EAI_MEMORY = Errno(net.EAI_MEMORY) EAI_NODATA = Errno(net.EAI_NODATA) EAI_NONAME = Errno(net.EAI_NONAME) EAI_OVERFLOW = Errno(net.EAI_OVERFLOW) EAI_PROTOCOL = Errno(net.EAI_PROTOCOL) EAI_SERVICE = Errno(net.EAI_SERVICE) EAI_SOCKTYPE = Errno(net.EAI_SOCKTYPE) )
const ( LLGoPackage = "link: $(pkg-config --libs libuv); -luv" LLGoFiles = "$(pkg-config --cflags libuv): _wrap/libuv.c" )
Variables ¶
This section is empty.
Functions ¶
func Freeaddrinfo ¶
func FsCopyfile ¶
func FsFtruncate ¶
func FsSendfile ¶
func Getaddrinfo ¶
func Getnameinfo ¶
func Getnameinfo(loop *Loop, req *GetNameInfo, getnameinfoCb GetnameinfoCb, addr *net.SockAddr, flags c.Int) c.Int
func HandleSize ¶
func HandleSize(handleType HandleType) uintptr
func HandleTypeName ¶
func HandleTypeName(handleType HandleType) *c.Char
func LibraryShutdown ¶
func LibraryShutdown()
func ReplaceAllocator ¶
func ReplaceAllocator(mallocFunc MallocFunc, reallocFunc ReallocFunc, callocFunc CallocFunc, freeFunc FreeFunc) c.Int
func Socketpair ¶
func StreamShutdown ¶ added in v0.9.5
func StreamShutdown(shutdown *Shutdown, stream *Stream, shutdownCb ShutdownCb) c.Int
func TcpConnect ¶
func ThreadGetCPU ¶ added in v0.9.8
func VersionString ¶
Types ¶
type AfterWorkCb ¶ added in v0.9.8
type Async ¶
type Async struct { Handle // On macOS arm64, sizeof uv_async_t is 128 bytes. // Handle is 92 bytes, so we need 36 bytes to fill the gap. // Maybe reserve more for future use. Unused [36]byte }
struct uv_async_t
type AsyncCb ¶ added in v0.9.5
type AsyncCb func(*Async)
typedef void (*uv_async_cb)(uv_async_t* handle); llgo:type C
type Check ¶
type Check struct {
Unused [120]byte
}
type Dirent ¶
type Dirent struct { Name *c.Char Type DirentType }
type DirentType ¶
const ( DirentUnknown DirentType = iota DirentFile DirentDir DirentLink DirentFifo DirentSocket DirentChar DirentBlock )
type Fs ¶
type Fs struct {
Unused [440]byte
}
func (*Fs) GetStatBuf ¶ added in v0.9.5
llgo:link (*Fs).GetStatBuf C.uv_fs_get_statbuf
func (*Fs) GetSystemError ¶ added in v0.9.5
llgo:link (*Fs).GetSystemError C.uv_fs_get_system_error
func (*Fs) ReqCleanup ¶ added in v0.9.5
func (req *Fs) ReqCleanup()
llgo:link (*Fs).ReqCleanup C.uv_fs_req_cleanup
type FsEvent ¶
type FsEvent struct {
Unused [0]byte
}
type FsPoll ¶
type FsPoll struct {
Unused [0]byte
}
type FsType ¶
const ( FS_UNKNOWN FsType = -1 FS_CUSTOM FsType = 0 FS_OPEN FsType = 1 FS_CLOSE FsType = 2 FS_READ FsType = 3 FS_WRITE FsType = 4 FS_SENDFILE FsType = 5 FS_STAT FsType = 6 FS_LSTAT FsType = 7 FS_FSTAT FsType = 8 FS_FTRUNCATE FsType = 9 FS_UTIME FsType = 10 FS_FUTIME FsType = 11 FS_ACCESS FsType = 12 FS_CHMOD FsType = 13 FS_FCHMOD FsType = 14 FS_FSYNC FsType = 15 FS_FDATASYNC FsType = 16 FS_UNLINK FsType = 17 FS_RMDIR FsType = 18 FS_MKDIR FsType = 19 FS_MKDTEMP FsType = 20 FS_RENAME FsType = 21 FS_SCANDIR FsType = 22 FS_LINK FsType = 23 FS_SYMLINK FsType = 24 FS_READLINK FsType = 25 FS_CHOWN FsType = 26 FS_FCHOWN FsType = 27 FS_REALPATH FsType = 28 FS_COPYFILE FsType = 29 FS_LCHOWN FsType = 30 FS_OPENDIR FsType = 31 FS_READDIR FsType = 32 FS_CLOSEDIR FsType = 33 FS_STATFS FsType = 34 FS_MKSTEMP FsType = 35 FS_LUTIME FsType = 36 )
type GetaddrinfoCb ¶
type GetaddrinfoCb func(req *GetAddrInfo, status c.Int, res *net.AddrInfo)
llgo:type C
type GetnameinfoCb ¶
llgo:type C
type Handle ¶
TODO(spongehah): Handle
func (*Handle) GetType ¶
func (handle *Handle) GetType() HandleType
llgo:link (*Handle).GetType C.uv_handle_get_type
func (*Handle) IsReadable ¶ added in v0.9.5
llgo:link (*Handle).IsReadable C.uv_is_readable
func (*Handle) IsWritable ¶ added in v0.9.5
llgo:link (*Handle).IsWritable C.uv_is_writable
func (*Handle) RecvBufferSize ¶
llgo:link (*Handle).RecvBufferSize C.uv_recv_buffer_size
func (*Handle) SendBufferSize ¶
llgo:link (*Handle).SendBufferSize C.uv_send_buffer_size
type HandleType ¶
const ( UNKNOWN_HANDLE HandleType = iota ASYNC CHECK FS_EVENT FS_POLL HANDLE IDLE NAMED_PIPE POLL PREPARE PROCESS STREAM TCP TIMER TTY UDP SIGNAL FILE HANDLE_TYPE_MAX )
type Idle ¶
type Idle struct {
Unused [120]byte
}
type Loop ¶
type Loop struct {
Unused [0]byte
}
func DefaultLoop ¶
func DefaultLoop() *Loop
func (*Loop) Async ¶ added in v0.9.5
int uv_async_init(uv_loop_t*, uv_async_t* async, uv_async_cb async_cb);
llgo:link (*Loop).Async C.uv_async_init
func (*Loop) BackendTimeout ¶ added in v0.9.5
llgo:link (*Loop).BackendTimeout C.uv_backend_timeout
func (*Loop) Stop ¶ added in v0.9.5
func (loop *Loop) Stop()
void uv_stop(uv_loop_t *loop)
llgo:link (*Loop).Stop C.uv_stop
func (*Loop) UpdateTime ¶ added in v0.9.5
func (loop *Loop) UpdateTime()
llgo:link (*Loop).UpdateTime C.uv_update_time
type LoopOption ¶
const ( LOOP_BLOCK_SIGNAL LoopOption = iota METRICS_IDLE_TIME )
type Req ¶
type Req struct {
Unused [64]byte
}
TODO(spongehah): Req
type Signal ¶
type Signal struct {
Unused [152]byte
}
func (*Signal) StartOneshot ¶ added in v0.9.5
llgo:link (*Signal).StartOneshot C.uv_signal_start_oneshot
type Stream ¶
TODO(spongehah): Stream
func (*Stream) GetWriteQueueSize ¶
llgo:link (*Stream).GetWriteQueueSize C.uv_stream_get_write_queue_size
func (*Stream) IsReadable ¶
llgo:link (*Stream).IsReadable C.uv_is_readable
func (*Stream) IsWritable ¶
llgo:link (*Stream).IsWritable C.uv_is_writable
func (*Stream) SetBlocking ¶
llgo:link (*Stream).SetBlocking C.uv_stream_set_blocking
type Tcp ¶
TODO(spongehah): Tcp
func (*Tcp) CloseReset ¶
llgo:link (*Tcp).CloseReset C.uv_tcp_close_reset
func (*Tcp) GetIoWatcherFd ¶ added in v0.9.5
llgo:link (*Tcp).GetIoWatcherFd C.uv_tcp_get_io_watcher_fd
func (*Tcp) Getpeername ¶
llgo:link (*Tcp).Getpeername C.uv_tcp_getpeername
func (*Tcp) Getsockname ¶
llgo:link (*Tcp).Getsockname C.uv_tcp_getsockname
type TcpFlags ¶
const ( /* Used with uv_tcp_bind, when an IPv6 address is used. */ TCP_IPV6ONLY TcpFlags = 1 )
type Thread ¶ added in v0.9.8
type Thread struct {
Unused [8]byte
}
func ThreadSelf ¶ added in v0.9.8
func ThreadSelf() Thread
func (*Thread) GetAffinity ¶ added in v0.9.8
llgo:link (*Thread).GetAffinity C.uv_thread_get_affinity
type ThreadOptions ¶ added in v0.9.8
type ThreadOptions struct {
// contains filtered or unexported fields
}
type Timer ¶
type Timer struct {
Unused [152]byte
}
TODO(spongehah): Timer
type Udp ¶
type Udp struct {
Unused [224]byte
}
TODO(spongehah): Udp
func (*Udp) GetSendQueueCount ¶
llgo:link (*Udp).GetSendQueueCount C.uv_udp_get_send_queue_count
func (*Udp) GetSendQueueSize ¶
llgo:link (*Udp).GetSendQueueSize C.uv_udp_get_send_queue_size
func (*Udp) Getpeername ¶
llgo:link (*Udp).Getpeername C.uv_udp_getpeername
func (*Udp) Getsockname ¶
llgo:link (*Udp).Getsockname C.uv_udp_getsockname
func (*Udp) SetBroadcast ¶
llgo:link (*Udp).SetBroadcast C.uv_udp_set_broadcast
func (*Udp) SetMembership ¶
func (udp *Udp) SetMembership(multicastAddr *c.Char, interfaceAddr *c.Char, membership Membership) c.Int
llgo:link (*Udp).SetMembership C.uv_udp_set_membership
func (*Udp) SetMulticastInterface ¶
llgo:link (*Udp).SetMulticastInterface C.uv_udp_set_multicast_interface
func (*Udp) SetMulticastLoop ¶
llgo:link (*Udp).SetMulticastLoop C.uv_udp_set_multicast_loop
func (*Udp) SetMulticastTTL ¶
llgo:link (*Udp).SetMulticastTTL C.uv_udp_set_multicast_ttl
func (*Udp) SourceMembership ¶
func (udp *Udp) SourceMembership(multicastAddr *c.Char, interfaceAddr *c.Char, sourceAddr *c.Char, membership Membership) c.Int
llgo:link (*Udp).SourceMembership C.uv_udp_set_source_membership
func (*Udp) UsingRecvmmsg ¶
llgo:link (*Udp).UsingRecvmmsg C.uv_udp_using_recvmmsg
type UdpFlags ¶
const ( /* Disables dual stack mode. */ UDP_IPV6ONLY UdpFlags = 1 /* * Indicates message was truncated because read buffer was too small. The * remainder was discarded by the OS. Used in uv_udp_recv_cb. */ UDP_PARTIAL UdpFlags = 2 /* * Indicates if SO_REUSEADDR will be set when binding the handle. * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that * multiple threads or processes can bind to the same address without error * (provided they all set the flag) but only the last one to bind will receive * any traffic, in effect "stealing" the port from the previous listener. */ UDP_REUSEADDR UdpFlags = 4 /* * Indicates that the message was received by recvmmsg, so the buffer provided * must not be freed by the recv_cb callback. */ UDP_MMSG_CHUNK UdpFlags = 8 /* * Indicates that the buffer provided has been fully utilized by recvmmsg and * that it should now be freed by the recv_cb callback. When this flag is set * in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL. */ UDP_MMSG_FREE UdpFlags = 16 /* * Indicates if IP_RECVERR/IPV6_RECVERR will be set when binding the handle. * This sets IP_RECVERR for IPv4 and IPV6_RECVERR for IPv6 UDP sockets on * Linux. This stops the Linux kernel from suppressing some ICMP error * messages and enables full ICMP error reporting for faster failover. * This flag is no-op on platforms other than Linux. */ UDP_LINUX_RECVERR UdpFlags = 32 /* * Indicates that recvmmsg should be used, if available. */ UDP_RECVMMSG UdpFlags = 256 )
* UDP support.