feat(c/libuv): Add GetIoWatcherFd func using LLGoFiles
This commit is contained in:
5
c/libuv/_wrap/libuv.c
Normal file
5
c/libuv/_wrap/libuv.c
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#include <uv.h>
|
||||||
|
|
||||||
|
int uv_tcp_get_io_watcher_fd (uv_tcp_t* handle) {
|
||||||
|
return handle->io_watcher.fd;
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
LLGoPackage = "link: $(pkg-config --libs libuv); -luv"
|
LLGoPackage = "link: $(pkg-config --libs libuv); -luv"
|
||||||
|
LLGoFiles = "$(pkg-config --cflags libuv): _wrap/libuv.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ----------------------------------------------
|
// ----------------------------------------------
|
||||||
|
|||||||
@@ -378,6 +378,11 @@ func (tcp *Tcp) CloseReset(closeCb CloseCb) c.Int {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// llgo:link (*Tcp).GetIoWatcherFd C.uv_tcp_get_io_watcher_fd
|
||||||
|
func (tcp *Tcp) GetIoWatcherFd() c.Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
//go:linkname TcpConnect C.uv_tcp_connect
|
//go:linkname TcpConnect C.uv_tcp_connect
|
||||||
func TcpConnect(req *Connect, tcp *Tcp, addr *net.SockAddr, connectCb ConnectCb) c.Int
|
func TcpConnect(req *Connect, tcp *Tcp, addr *net.SockAddr, connectCb ConnectCb) c.Int
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user