Revert "feat(c/libuv): Add GetIoWatcherFd func"
This reverts commit 1ce16727b1195a65c8f2c9de07a864ed5e3902ef. Signed-off-by: hackerchai <i@hackerchai.com>
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
package libuv
|
||||
|
||||
//#cgo pkg-config: libuv
|
||||
//#include <uv.h>
|
||||
import "C"
|
||||
|
||||
import (
|
||||
_ "unsafe"
|
||||
|
||||
@@ -69,14 +65,22 @@ type UdpFlags c.Int
|
||||
|
||||
/* Handle types. */
|
||||
|
||||
type Tcp C.uv_tcp_t
|
||||
// TODO(spongehah): Handle
|
||||
type Handle struct {
|
||||
Data c.Pointer
|
||||
Unused [88]byte
|
||||
}
|
||||
|
||||
type Handle C.uv_handle_t
|
||||
// TODO(spongehah): Stream
|
||||
type Stream struct {
|
||||
Data c.Pointer
|
||||
Unused [256]byte
|
||||
}
|
||||
|
||||
type Stream C.uv_stream_t
|
||||
|
||||
type Shutdown struct {
|
||||
Unused [0]byte
|
||||
// TODO(spongehah): Tcp
|
||||
type Tcp struct {
|
||||
Data c.Pointer
|
||||
Unused [256]byte
|
||||
}
|
||||
|
||||
type Udp struct {
|
||||
@@ -93,9 +97,17 @@ type UdpSend struct {
|
||||
Unused [0]byte
|
||||
}
|
||||
|
||||
type Connect C.uv_connect_t
|
||||
// TODO(spongehah): Write
|
||||
type Write struct {
|
||||
Data c.Pointer
|
||||
Unused [184]byte
|
||||
}
|
||||
|
||||
type Write C.uv_write_t
|
||||
// TODO(spongehah): Connect
|
||||
type Connect struct {
|
||||
Data c.Pointer
|
||||
Unused [88]byte
|
||||
}
|
||||
|
||||
type GetAddrInfo struct {
|
||||
Unused [0]byte
|
||||
@@ -132,7 +144,6 @@ type ConnectionCb func(server *Stream, status c.Int)
|
||||
|
||||
// llgo:type C
|
||||
type ShutdownCb func(req *Shutdown, status c.Int)
|
||||
|
||||
// ----------------------------------------------
|
||||
|
||||
/* Handle related function and method */
|
||||
@@ -362,11 +373,6 @@ func (tcp *Tcp) CloseReset(closeCb CloseCb) c.Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (tcp *Tcp) GetIoWatcherFd() c.Int {
|
||||
tcp_s := (*C.uv_tcp_t)(c.Pointer(tcp))
|
||||
return c.Int(tcp_s.io_watcher.fd)
|
||||
}
|
||||
|
||||
//go:linkname TcpConnect C.uv_tcp_connect
|
||||
func TcpConnect(req *Connect, tcp *Tcp, addr *net.SockAddr, connectCb ConnectCb) c.Int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user