View definition

(Socket).SetPortHook

Defined in github.com/go-mangos/mangos/socket.go

Description

SetPortHook sets a PortHook function to be called when a Port is added or removed from this socket (connect/disconnect). The previous hook is returned (nil if none.)