golang
A mapping of the TIPC C API from libtipc to the GO language

= Construtor to create TipcConn instance
func NewConn(sk_type uint32) (*TipcConn, error)
func NewConnFromFd(fd int) (*TipcConn)


= Construtor to create TipcTopSrvConn instance
func NewTopSrvConn(topsrv_node uint32) (*TipcTopSrvConn)


= TipcConn APIs
func (conn *TipcConn) GetFd() int
func (conn *TipcConn) Bind(stype uint32, lower uint32, upper uint32, scope uint32) (int)
func (conn *TipcConn) Unbind(stype uint32, lower uint32, upper uint32) (int)
func (conn *TipcConn) Close()
func (conn *TipcConn) Sockaddr(sockid *TipcAddr) (int)
func (conn *TipcConn) Sock_Non_Block() (int)
func (conn *TipcConn) Sock_Rejectable() (int)
func (conn *TipcConn) Connect(dst *TipcAddr) (int)
func (conn *TipcConn) Accept(src *TipcAddr) (int)
func (conn *TipcConn) Listen(backlog int) (int)
func (conn *TipcConn) Recvfrom(buf []byte, src *TipcAddr, dst *TipcAddr, err *int) (int)
func (conn *TipcConn) Recv(buf []byte, waitall bool) (int)
func (conn *TipcConn) Sendmsg(msg *syscall.Msghdr) (int)
func (conn *TipcConn) Sendto(buf []byte, dst *TipcAddr) (int)
func (conn *TipcConn) Sendmcast(buf []byte, dst *TipcAddr) (int)
func (conn *TipcConn) Send(buf []byte) (int)


= TipcTopSrvConn APIs
func (conn *TipcTopSrvConn) Srv_subscr(stype, lower, upper uint32, all bool, expire int) (int)
func (conn *TipcTopSrvConn) GetFd() int
func (conn *TipcTopSrvConn) Close()
func (conn *TipcTopSrvConn) Srv_evt(srv *TipcAddr, id *TipcAddr, up *bool, expired *bool) (int)
func (conn *TipcTopSrvConn) Neigh_evt(neigh_node *uint32, up *bool) (int)
func (conn *TipcTopSrvConn) Link_evt(neigh_node *uint32, up *bool, local_bearerid *int, remote_bearerid *int) (int)


= Helpers function
func Tipc_own_node() (uint32)
func Srv_wait(srv *TipcAddr, expire int)
func Neigh_subscr(topsrv_node uint32) (int)
func Link_subscr(topsrv_node uint32) (int)
func Tipc_ntoa(sockid *TipcAddr, buf []byte) string
func Tipc_rtoa(stype uint32, lower uint32, upper uint32, node uint32, buf []byte) string
func Tipc_linkname(buf []byte, peer uint32, bearerid int) (string)


Examples:
+demos/golang/hello_world (RDM socket):
- hello_go_api_client.go
- hello_go_api_server.go

Run cmd:
$CGO_CFLAGS=-I<include> go run demos/golang/hello_world/hello_go_api_client.go
$CGO_CFLAGS=-I<include> go run demos/golang/hello_world/hello_go_api_server.go

+demos/golang/connection (with RDM, SEQPACKET, STREAM socket):
- go_api_client.go
- go_api_server.go

Run cmd:
$CGO_CFLAGS=-I<include> go run demos/golang/connection/go_api_client.go
$CGO_CFLAGS=-I<include> go run demos/golang/connection/go_api_server.go
