Documentation
¶
Index ¶
- func Accept(socketId int32, callback js.Func[func(acceptInfo *AcceptInfo)]) (ret js.Void)
- func Bind(socketId int32, address js.String, port int32, ...) (ret js.Void)
- func Connect(socketId int32, hostname js.String, port int32, ...) (ret js.Void)
- func Create(typ SocketType, options CreateOptions, ...) (ret js.Void)
- func Destroy(socketId int32) (ret js.Void)
- func Disconnect(socketId int32) (ret js.Void)
- func FuncAccept() (...)
- func FuncBind() (...)
- func FuncConnect() (...)
- func FuncCreate() (...)
- func FuncDestroy() (fn js.Func[func(socketId int32)])
- func FuncDisconnect() (fn js.Func[func(socketId int32)])
- func FuncGetInfo() (fn js.Func[func(socketId int32, callback js.Func[func(result *SocketInfo)])])
- func FuncGetJoinedGroups() (...)
- func FuncGetNetworkList() (fn js.Func[func(callback js.Func[func(result js.Array[NetworkInterface])])])
- func FuncJoinGroup() (...)
- func FuncLeaveGroup() (...)
- func FuncListen() (...)
- func FuncRead() (...)
- func FuncRecvFrom() (...)
- func FuncSecure() (...)
- func FuncSendTo() (...)
- func FuncSetKeepAlive() (...)
- func FuncSetMulticastLoopbackMode() (...)
- func FuncSetMulticastTimeToLive() (...)
- func FuncSetNoDelay() (...)
- func FuncWrite() (...)
- func GetInfo(socketId int32, callback js.Func[func(result *SocketInfo)]) (ret js.Void)
- func GetJoinedGroups(socketId int32, callback js.Func[func(groups js.Array[js.String])]) (ret js.Void)
- func GetNetworkList(callback js.Func[func(result js.Array[NetworkInterface])]) (ret js.Void)
- func HasFuncAccept() bool
- func HasFuncBind() bool
- func HasFuncConnect() bool
- func HasFuncCreate() bool
- func HasFuncDestroy() bool
- func HasFuncDisconnect() bool
- func HasFuncGetInfo() bool
- func HasFuncGetJoinedGroups() bool
- func HasFuncGetNetworkList() bool
- func HasFuncJoinGroup() bool
- func HasFuncLeaveGroup() bool
- func HasFuncListen() bool
- func HasFuncRead() bool
- func HasFuncRecvFrom() bool
- func HasFuncSecure() bool
- func HasFuncSendTo() bool
- func HasFuncSetKeepAlive() bool
- func HasFuncSetMulticastLoopbackMode() bool
- func HasFuncSetMulticastTimeToLive() bool
- func HasFuncSetNoDelay() bool
- func HasFuncWrite() bool
- func JoinGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void)
- func LeaveGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void)
- func Listen(socketId int32, address js.String, port int32, backlog int32, ...) (ret js.Void)
- func Read(socketId int32, bufferSize int32, callback js.Func[func(readInfo *ReadInfo)]) (ret js.Void)
- func RecvFrom(socketId int32, bufferSize int32, ...) (ret js.Void)
- func Secure(socketId int32, options SecureOptions, callback js.Func[func(result int32)]) (ret js.Void)
- func SendTo(socketId int32, data js.ArrayBuffer, address js.String, port int32, ...) (ret js.Void)
- func SetKeepAlive(socketId int32, enable bool, delay int32, callback js.Func[func(result bool)]) (ret js.Void)
- func SetMulticastLoopbackMode(socketId int32, enabled bool, callback js.Func[func(result int32)]) (ret js.Void)
- func SetMulticastTimeToLive(socketId int32, ttl int32, callback js.Func[func(result int32)]) (ret js.Void)
- func SetNoDelay(socketId int32, noDelay bool, callback js.Func[func(result bool)]) (ret js.Void)
- func TryAccept(socketId int32, callback js.Func[func(acceptInfo *AcceptInfo)]) (ret js.Void, exception js.Any, ok bool)
- func TryBind(socketId int32, address js.String, port int32, ...) (ret js.Void, exception js.Any, ok bool)
- func TryConnect(socketId int32, hostname js.String, port int32, ...) (ret js.Void, exception js.Any, ok bool)
- func TryCreate(typ SocketType, options CreateOptions, ...) (ret js.Void, exception js.Any, ok bool)
- func TryDestroy(socketId int32) (ret js.Void, exception js.Any, ok bool)
- func TryDisconnect(socketId int32) (ret js.Void, exception js.Any, ok bool)
- func TryGetInfo(socketId int32, callback js.Func[func(result *SocketInfo)]) (ret js.Void, exception js.Any, ok bool)
- func TryGetJoinedGroups(socketId int32, callback js.Func[func(groups js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool)
- func TryGetNetworkList(callback js.Func[func(result js.Array[NetworkInterface])]) (ret js.Void, exception js.Any, ok bool)
- func TryJoinGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
- func TryLeaveGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
- func TryListen(socketId int32, address js.String, port int32, backlog int32, ...) (ret js.Void, exception js.Any, ok bool)
- func TryRead(socketId int32, bufferSize int32, callback js.Func[func(readInfo *ReadInfo)]) (ret js.Void, exception js.Any, ok bool)
- func TryRecvFrom(socketId int32, bufferSize int32, ...) (ret js.Void, exception js.Any, ok bool)
- func TrySecure(socketId int32, options SecureOptions, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
- func TrySendTo(socketId int32, data js.ArrayBuffer, address js.String, port int32, ...) (ret js.Void, exception js.Any, ok bool)
- func TrySetKeepAlive(socketId int32, enable bool, delay int32, callback js.Func[func(result bool)]) (ret js.Void, exception js.Any, ok bool)
- func TrySetMulticastLoopbackMode(socketId int32, enabled bool, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
- func TrySetMulticastTimeToLive(socketId int32, ttl int32, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
- func TrySetNoDelay(socketId int32, noDelay bool, callback js.Func[func(result bool)]) (ret js.Void, exception js.Any, ok bool)
- func TryWrite(socketId int32, data js.ArrayBuffer, ...) (ret js.Void, exception js.Any, ok bool)
- func Write(socketId int32, data js.ArrayBuffer, ...) (ret js.Void)
- type AcceptCallback
- type AcceptCallbackFunc
- type AcceptInfo
- type BindCallback
- type BindCallbackFunc
- type ConnectCallback
- type ConnectCallbackFunc
- type CreateCallback
- type CreateCallbackFunc
- type CreateInfo
- type CreateOptions
- type GetInfoCallback
- type GetInfoCallbackFunc
- type GetJoinedGroupsCallback
- type GetJoinedGroupsCallbackFunc
- type GetNetworkCallback
- type GetNetworkCallbackFunc
- type JoinGroupCallback
- type JoinGroupCallbackFunc
- type LeaveGroupCallback
- type LeaveGroupCallbackFunc
- type ListenCallback
- type ListenCallbackFunc
- type NetworkInterface
- type ReadCallback
- type ReadCallbackFunc
- type ReadInfo
- type RecvFromCallback
- type RecvFromCallbackFunc
- type RecvFromInfo
- type SecureCallback
- type SecureCallbackFunc
- type SecureOptions
- type SendToCallback
- type SendToCallbackFunc
- type SetKeepAliveCallback
- type SetKeepAliveCallbackFunc
- type SetMulticastLoopbackModeCallback
- type SetMulticastLoopbackModeCallbackFunc
- type SetMulticastTimeToLiveCallback
- type SetMulticastTimeToLiveCallbackFunc
- type SetNoDelayCallback
- type SetNoDelayCallbackFunc
- type SocketInfo
- type SocketType
- type TLSVersionConstraints
- type WriteCallback
- type WriteCallbackFunc
- type WriteInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind(socketId int32, address js.String, port int32, callback js.Func[func(result int32)]) (ret js.Void)
Bind calls the function "WEBEXT.socket.bind" directly.
func Connect ¶
func Connect(socketId int32, hostname js.String, port int32, callback js.Func[func(result int32)]) (ret js.Void)
Connect calls the function "WEBEXT.socket.connect" directly.
func Create ¶
func Create(typ SocketType, options CreateOptions, callback js.Func[func(createInfo *CreateInfo)]) (ret js.Void)
Create calls the function "WEBEXT.socket.create" directly.
func Disconnect ¶
Disconnect calls the function "WEBEXT.socket.disconnect" directly.
func FuncAccept ¶
func FuncAccept() (fn js.Func[func(socketId int32, callback js.Func[func(acceptInfo *AcceptInfo)])])
FuncAccept returns the function "WEBEXT.socket.accept".
func FuncBind ¶
func FuncBind() (fn js.Func[func(socketId int32, address js.String, port int32, callback js.Func[func(result int32)])])
FuncBind returns the function "WEBEXT.socket.bind".
func FuncConnect ¶
func FuncConnect() (fn js.Func[func(socketId int32, hostname js.String, port int32, callback js.Func[func(result int32)])])
FuncConnect returns the function "WEBEXT.socket.connect".
func FuncCreate ¶
func FuncCreate() (fn js.Func[func(typ SocketType, options CreateOptions, callback js.Func[func(createInfo *CreateInfo)])])
FuncCreate returns the function "WEBEXT.socket.create".
func FuncDestroy ¶
FuncDestroy returns the function "WEBEXT.socket.destroy".
func FuncDisconnect ¶
FuncDisconnect returns the function "WEBEXT.socket.disconnect".
func FuncGetInfo ¶
FuncGetInfo returns the function "WEBEXT.socket.getInfo".
func FuncGetJoinedGroups ¶
func FuncGetJoinedGroups() (fn js.Func[func(socketId int32, callback js.Func[func(groups js.Array[js.String])])])
FuncGetJoinedGroups returns the function "WEBEXT.socket.getJoinedGroups".
func FuncGetNetworkList ¶
func FuncGetNetworkList() (fn js.Func[func(callback js.Func[func(result js.Array[NetworkInterface])])])
FuncGetNetworkList returns the function "WEBEXT.socket.getNetworkList".
func FuncJoinGroup ¶
func FuncJoinGroup() (fn js.Func[func(socketId int32, address js.String, callback js.Func[func(result int32)])])
FuncJoinGroup returns the function "WEBEXT.socket.joinGroup".
func FuncLeaveGroup ¶
func FuncLeaveGroup() (fn js.Func[func(socketId int32, address js.String, callback js.Func[func(result int32)])])
FuncLeaveGroup returns the function "WEBEXT.socket.leaveGroup".
func FuncListen ¶
func FuncListen() (fn js.Func[func(socketId int32, address js.String, port int32, backlog int32, callback js.Func[func(result int32)])])
FuncListen returns the function "WEBEXT.socket.listen".
func FuncRead ¶
func FuncRead() (fn js.Func[func(socketId int32, bufferSize int32, callback js.Func[func(readInfo *ReadInfo)])])
FuncRead returns the function "WEBEXT.socket.read".
func FuncRecvFrom ¶
func FuncRecvFrom() (fn js.Func[func(socketId int32, bufferSize int32, callback js.Func[func(recvFromInfo *RecvFromInfo)])])
FuncRecvFrom returns the function "WEBEXT.socket.recvFrom".
func FuncSecure ¶
func FuncSecure() (fn js.Func[func(socketId int32, options SecureOptions, callback js.Func[func(result int32)])])
FuncSecure returns the function "WEBEXT.socket.secure".
func FuncSendTo ¶
func FuncSendTo() (fn js.Func[func(socketId int32, data js.ArrayBuffer, address js.String, port int32, callback js.Func[func(writeInfo *WriteInfo)])])
FuncSendTo returns the function "WEBEXT.socket.sendTo".
func FuncSetKeepAlive ¶
func FuncSetKeepAlive() (fn js.Func[func(socketId int32, enable bool, delay int32, callback js.Func[func(result bool)])])
FuncSetKeepAlive returns the function "WEBEXT.socket.setKeepAlive".
func FuncSetMulticastLoopbackMode ¶
func FuncSetMulticastLoopbackMode() (fn js.Func[func(socketId int32, enabled bool, callback js.Func[func(result int32)])])
FuncSetMulticastLoopbackMode returns the function "WEBEXT.socket.setMulticastLoopbackMode".
func FuncSetMulticastTimeToLive ¶
func FuncSetMulticastTimeToLive() (fn js.Func[func(socketId int32, ttl int32, callback js.Func[func(result int32)])])
FuncSetMulticastTimeToLive returns the function "WEBEXT.socket.setMulticastTimeToLive".
func FuncSetNoDelay ¶
func FuncSetNoDelay() (fn js.Func[func(socketId int32, noDelay bool, callback js.Func[func(result bool)])])
FuncSetNoDelay returns the function "WEBEXT.socket.setNoDelay".
func FuncWrite ¶
func FuncWrite() (fn js.Func[func(socketId int32, data js.ArrayBuffer, callback js.Func[func(writeInfo *WriteInfo)])])
FuncWrite returns the function "WEBEXT.socket.write".
func GetJoinedGroups ¶
func GetJoinedGroups(socketId int32, callback js.Func[func(groups js.Array[js.String])]) (ret js.Void)
GetJoinedGroups calls the function "WEBEXT.socket.getJoinedGroups" directly.
func GetNetworkList ¶
GetNetworkList calls the function "WEBEXT.socket.getNetworkList" directly.
func HasFuncAccept ¶
func HasFuncAccept() bool
HasFuncAccept returns true if the function "WEBEXT.socket.accept" exists.
func HasFuncBind ¶
func HasFuncBind() bool
HasFuncBind returns true if the function "WEBEXT.socket.bind" exists.
func HasFuncConnect ¶
func HasFuncConnect() bool
HasFuncConnect returns true if the function "WEBEXT.socket.connect" exists.
func HasFuncCreate ¶
func HasFuncCreate() bool
HasFuncCreate returns true if the function "WEBEXT.socket.create" exists.
func HasFuncDestroy ¶
func HasFuncDestroy() bool
HasFuncDestroy returns true if the function "WEBEXT.socket.destroy" exists.
func HasFuncDisconnect ¶
func HasFuncDisconnect() bool
HasFuncDisconnect returns true if the function "WEBEXT.socket.disconnect" exists.
func HasFuncGetInfo ¶
func HasFuncGetInfo() bool
HasFuncGetInfo returns true if the function "WEBEXT.socket.getInfo" exists.
func HasFuncGetJoinedGroups ¶
func HasFuncGetJoinedGroups() bool
HasFuncGetJoinedGroups returns true if the function "WEBEXT.socket.getJoinedGroups" exists.
func HasFuncGetNetworkList ¶
func HasFuncGetNetworkList() bool
HasFuncGetNetworkList returns true if the function "WEBEXT.socket.getNetworkList" exists.
func HasFuncJoinGroup ¶
func HasFuncJoinGroup() bool
HasFuncJoinGroup returns true if the function "WEBEXT.socket.joinGroup" exists.
func HasFuncLeaveGroup ¶
func HasFuncLeaveGroup() bool
HasFuncLeaveGroup returns true if the function "WEBEXT.socket.leaveGroup" exists.
func HasFuncListen ¶
func HasFuncListen() bool
HasFuncListen returns true if the function "WEBEXT.socket.listen" exists.
func HasFuncRead ¶
func HasFuncRead() bool
HasFuncRead returns true if the function "WEBEXT.socket.read" exists.
func HasFuncRecvFrom ¶
func HasFuncRecvFrom() bool
HasFuncRecvFrom returns true if the function "WEBEXT.socket.recvFrom" exists.
func HasFuncSecure ¶
func HasFuncSecure() bool
HasFuncSecure returns true if the function "WEBEXT.socket.secure" exists.
func HasFuncSendTo ¶
func HasFuncSendTo() bool
HasFuncSendTo returns true if the function "WEBEXT.socket.sendTo" exists.
func HasFuncSetKeepAlive ¶
func HasFuncSetKeepAlive() bool
HasFuncSetKeepAlive returns true if the function "WEBEXT.socket.setKeepAlive" exists.
func HasFuncSetMulticastLoopbackMode ¶
func HasFuncSetMulticastLoopbackMode() bool
HasFuncSetMulticastLoopbackMode returns true if the function "WEBEXT.socket.setMulticastLoopbackMode" exists.
func HasFuncSetMulticastTimeToLive ¶
func HasFuncSetMulticastTimeToLive() bool
HasFuncSetMulticastTimeToLive returns true if the function "WEBEXT.socket.setMulticastTimeToLive" exists.
func HasFuncSetNoDelay ¶
func HasFuncSetNoDelay() bool
HasFuncSetNoDelay returns true if the function "WEBEXT.socket.setNoDelay" exists.
func HasFuncWrite ¶
func HasFuncWrite() bool
HasFuncWrite returns true if the function "WEBEXT.socket.write" exists.
func JoinGroup ¶
func JoinGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void)
JoinGroup calls the function "WEBEXT.socket.joinGroup" directly.
func LeaveGroup ¶
func LeaveGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void)
LeaveGroup calls the function "WEBEXT.socket.leaveGroup" directly.
func Listen ¶
func Listen(socketId int32, address js.String, port int32, backlog int32, callback js.Func[func(result int32)]) (ret js.Void)
Listen calls the function "WEBEXT.socket.listen" directly.
func Read ¶
func Read(socketId int32, bufferSize int32, callback js.Func[func(readInfo *ReadInfo)]) (ret js.Void)
Read calls the function "WEBEXT.socket.read" directly.
func RecvFrom ¶
func RecvFrom(socketId int32, bufferSize int32, callback js.Func[func(recvFromInfo *RecvFromInfo)]) (ret js.Void)
RecvFrom calls the function "WEBEXT.socket.recvFrom" directly.
func Secure ¶
func Secure(socketId int32, options SecureOptions, callback js.Func[func(result int32)]) (ret js.Void)
Secure calls the function "WEBEXT.socket.secure" directly.
func SendTo ¶
func SendTo(socketId int32, data js.ArrayBuffer, address js.String, port int32, callback js.Func[func(writeInfo *WriteInfo)]) (ret js.Void)
SendTo calls the function "WEBEXT.socket.sendTo" directly.
func SetKeepAlive ¶
func SetKeepAlive(socketId int32, enable bool, delay int32, callback js.Func[func(result bool)]) (ret js.Void)
SetKeepAlive calls the function "WEBEXT.socket.setKeepAlive" directly.
func SetMulticastLoopbackMode ¶
func SetMulticastLoopbackMode(socketId int32, enabled bool, callback js.Func[func(result int32)]) (ret js.Void)
SetMulticastLoopbackMode calls the function "WEBEXT.socket.setMulticastLoopbackMode" directly.
func SetMulticastTimeToLive ¶
func SetMulticastTimeToLive(socketId int32, ttl int32, callback js.Func[func(result int32)]) (ret js.Void)
SetMulticastTimeToLive calls the function "WEBEXT.socket.setMulticastTimeToLive" directly.
func SetNoDelay ¶
SetNoDelay calls the function "WEBEXT.socket.setNoDelay" directly.
func TryAccept ¶
func TryAccept(socketId int32, callback js.Func[func(acceptInfo *AcceptInfo)]) (ret js.Void, exception js.Any, ok bool)
TryAccept calls the function "WEBEXT.socket.accept" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryBind ¶
func TryBind(socketId int32, address js.String, port int32, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TryBind calls the function "WEBEXT.socket.bind" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryConnect ¶
func TryConnect(socketId int32, hostname js.String, port int32, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TryConnect calls the function "WEBEXT.socket.connect" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryCreate ¶
func TryCreate(typ SocketType, options CreateOptions, callback js.Func[func(createInfo *CreateInfo)]) (ret js.Void, exception js.Any, ok bool)
TryCreate calls the function "WEBEXT.socket.create" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryDestroy ¶
TryDestroy calls the function "WEBEXT.socket.destroy" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryDisconnect ¶
TryDisconnect calls the function "WEBEXT.socket.disconnect" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryGetInfo ¶
func TryGetInfo(socketId int32, callback js.Func[func(result *SocketInfo)]) (ret js.Void, exception js.Any, ok bool)
TryGetInfo calls the function "WEBEXT.socket.getInfo" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryGetJoinedGroups ¶
func TryGetJoinedGroups(socketId int32, callback js.Func[func(groups js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool)
TryGetJoinedGroups calls the function "WEBEXT.socket.getJoinedGroups" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryGetNetworkList ¶
func TryGetNetworkList(callback js.Func[func(result js.Array[NetworkInterface])]) (ret js.Void, exception js.Any, ok bool)
TryGetNetworkList calls the function "WEBEXT.socket.getNetworkList" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryJoinGroup ¶
func TryJoinGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TryJoinGroup calls the function "WEBEXT.socket.joinGroup" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryLeaveGroup ¶
func TryLeaveGroup(socketId int32, address js.String, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TryLeaveGroup calls the function "WEBEXT.socket.leaveGroup" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryListen ¶
func TryListen(socketId int32, address js.String, port int32, backlog int32, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TryListen calls the function "WEBEXT.socket.listen" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryRead ¶
func TryRead(socketId int32, bufferSize int32, callback js.Func[func(readInfo *ReadInfo)]) (ret js.Void, exception js.Any, ok bool)
TryRead calls the function "WEBEXT.socket.read" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryRecvFrom ¶
func TryRecvFrom(socketId int32, bufferSize int32, callback js.Func[func(recvFromInfo *RecvFromInfo)]) (ret js.Void, exception js.Any, ok bool)
TryRecvFrom calls the function "WEBEXT.socket.recvFrom" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySecure ¶
func TrySecure(socketId int32, options SecureOptions, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TrySecure calls the function "WEBEXT.socket.secure" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySendTo ¶
func TrySendTo(socketId int32, data js.ArrayBuffer, address js.String, port int32, callback js.Func[func(writeInfo *WriteInfo)]) (ret js.Void, exception js.Any, ok bool)
TrySendTo calls the function "WEBEXT.socket.sendTo" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySetKeepAlive ¶
func TrySetKeepAlive(socketId int32, enable bool, delay int32, callback js.Func[func(result bool)]) (ret js.Void, exception js.Any, ok bool)
TrySetKeepAlive calls the function "WEBEXT.socket.setKeepAlive" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySetMulticastLoopbackMode ¶
func TrySetMulticastLoopbackMode(socketId int32, enabled bool, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TrySetMulticastLoopbackMode calls the function "WEBEXT.socket.setMulticastLoopbackMode" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySetMulticastTimeToLive ¶
func TrySetMulticastTimeToLive(socketId int32, ttl int32, callback js.Func[func(result int32)]) (ret js.Void, exception js.Any, ok bool)
TrySetMulticastTimeToLive calls the function "WEBEXT.socket.setMulticastTimeToLive" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TrySetNoDelay ¶
func TrySetNoDelay(socketId int32, noDelay bool, callback js.Func[func(result bool)]) (ret js.Void, exception js.Any, ok bool)
TrySetNoDelay calls the function "WEBEXT.socket.setNoDelay" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
Types ¶
type AcceptCallback ¶
type AcceptCallback[T any] struct { Fn func(arg T, this js.Ref, acceptInfo *AcceptInfo) js.Ref Arg T }
func (*AcceptCallback[T]) DispatchCallback ¶
func (cb *AcceptCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*AcceptCallback[T]) Register ¶
func (cb *AcceptCallback[T]) Register() js.Func[func(acceptInfo *AcceptInfo)]
type AcceptCallbackFunc ¶
type AcceptCallbackFunc func(this js.Ref, acceptInfo *AcceptInfo) js.Ref
func (AcceptCallbackFunc) DispatchCallback ¶
func (fn AcceptCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (AcceptCallbackFunc) Register ¶
func (fn AcceptCallbackFunc) Register() js.Func[func(acceptInfo *AcceptInfo)]
type AcceptInfo ¶
type AcceptInfo struct {
// ResultCode is "AcceptInfo.resultCode"
//
// Optional
//
// NOTE: FFI_USE_ResultCode MUST be set to true to make this field effective.
ResultCode int32
// SocketId is "AcceptInfo.socketId"
//
// Optional
//
// NOTE: FFI_USE_SocketId MUST be set to true to make this field effective.
SocketId int32
FFI_USE_ResultCode bool // for ResultCode.
FFI_USE_SocketId bool // for SocketId.
FFI_USE bool
}
func (*AcceptInfo) FreeMembers ¶
func (p *AcceptInfo) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (AcceptInfo) FromRef ¶
func (p AcceptInfo) FromRef(ref js.Ref) AcceptInfo
FromRef calls UpdateFrom and returns a AcceptInfo with all fields set.
func (AcceptInfo) New ¶
func (p AcceptInfo) New() js.Ref
New creates a new AcceptInfo in the application heap.
func (*AcceptInfo) Update ¶
func (p *AcceptInfo) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*AcceptInfo) UpdateFrom ¶
func (p *AcceptInfo) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type BindCallback ¶
func (*BindCallback[T]) DispatchCallback ¶
func (cb *BindCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type BindCallbackFunc ¶
func (BindCallbackFunc) DispatchCallback ¶
func (fn BindCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ConnectCallback ¶
func (*ConnectCallback[T]) DispatchCallback ¶
func (cb *ConnectCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ConnectCallbackFunc ¶
func (ConnectCallbackFunc) DispatchCallback ¶
func (fn ConnectCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type CreateCallback ¶
type CreateCallback[T any] struct { Fn func(arg T, this js.Ref, createInfo *CreateInfo) js.Ref Arg T }
func (*CreateCallback[T]) DispatchCallback ¶
func (cb *CreateCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*CreateCallback[T]) Register ¶
func (cb *CreateCallback[T]) Register() js.Func[func(createInfo *CreateInfo)]
type CreateCallbackFunc ¶
type CreateCallbackFunc func(this js.Ref, createInfo *CreateInfo) js.Ref
func (CreateCallbackFunc) DispatchCallback ¶
func (fn CreateCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (CreateCallbackFunc) Register ¶
func (fn CreateCallbackFunc) Register() js.Func[func(createInfo *CreateInfo)]
type CreateInfo ¶
type CreateInfo struct {
// SocketId is "CreateInfo.socketId"
//
// Optional
//
// NOTE: FFI_USE_SocketId MUST be set to true to make this field effective.
SocketId int32
FFI_USE_SocketId bool // for SocketId.
FFI_USE bool
}
func (*CreateInfo) FreeMembers ¶
func (p *CreateInfo) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (CreateInfo) FromRef ¶
func (p CreateInfo) FromRef(ref js.Ref) CreateInfo
FromRef calls UpdateFrom and returns a CreateInfo with all fields set.
func (CreateInfo) New ¶
func (p CreateInfo) New() js.Ref
New creates a new CreateInfo in the application heap.
func (*CreateInfo) Update ¶
func (p *CreateInfo) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*CreateInfo) UpdateFrom ¶
func (p *CreateInfo) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type CreateOptions ¶
type CreateOptions struct {
FFI_USE bool
}
func (*CreateOptions) FreeMembers ¶
func (p *CreateOptions) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (CreateOptions) FromRef ¶
func (p CreateOptions) FromRef(ref js.Ref) CreateOptions
FromRef calls UpdateFrom and returns a CreateOptions with all fields set.
func (CreateOptions) New ¶
func (p CreateOptions) New() js.Ref
New creates a new CreateOptions in the application heap.
func (*CreateOptions) Update ¶
func (p *CreateOptions) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*CreateOptions) UpdateFrom ¶
func (p *CreateOptions) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type GetInfoCallback ¶
func (*GetInfoCallback[T]) DispatchCallback ¶
func (cb *GetInfoCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*GetInfoCallback[T]) Register ¶
func (cb *GetInfoCallback[T]) Register() js.Func[func(result *SocketInfo)]
type GetInfoCallbackFunc ¶
type GetInfoCallbackFunc func(this js.Ref, result *SocketInfo) js.Ref
func (GetInfoCallbackFunc) DispatchCallback ¶
func (fn GetInfoCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (GetInfoCallbackFunc) Register ¶
func (fn GetInfoCallbackFunc) Register() js.Func[func(result *SocketInfo)]
type GetJoinedGroupsCallback ¶
type GetJoinedGroupsCallback[T any] struct { Fn func(arg T, this js.Ref, groups js.Array[js.String]) js.Ref Arg T }
func (*GetJoinedGroupsCallback[T]) DispatchCallback ¶
func (cb *GetJoinedGroupsCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type GetJoinedGroupsCallbackFunc ¶
func (GetJoinedGroupsCallbackFunc) DispatchCallback ¶
func (fn GetJoinedGroupsCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type GetNetworkCallback ¶
type GetNetworkCallback[T any] struct { Fn func(arg T, this js.Ref, result js.Array[NetworkInterface]) js.Ref Arg T }
func (*GetNetworkCallback[T]) DispatchCallback ¶
func (cb *GetNetworkCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*GetNetworkCallback[T]) Register ¶
func (cb *GetNetworkCallback[T]) Register() js.Func[func(result js.Array[NetworkInterface])]
type GetNetworkCallbackFunc ¶
func (GetNetworkCallbackFunc) DispatchCallback ¶
func (fn GetNetworkCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (GetNetworkCallbackFunc) Register ¶
func (fn GetNetworkCallbackFunc) Register() js.Func[func(result js.Array[NetworkInterface])]
type JoinGroupCallback ¶
func (*JoinGroupCallback[T]) DispatchCallback ¶
func (cb *JoinGroupCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type JoinGroupCallbackFunc ¶
func (JoinGroupCallbackFunc) DispatchCallback ¶
func (fn JoinGroupCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type LeaveGroupCallback ¶
func (*LeaveGroupCallback[T]) DispatchCallback ¶
func (cb *LeaveGroupCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type LeaveGroupCallbackFunc ¶
func (LeaveGroupCallbackFunc) DispatchCallback ¶
func (fn LeaveGroupCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ListenCallback ¶
func (*ListenCallback[T]) DispatchCallback ¶
func (cb *ListenCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ListenCallbackFunc ¶
func (ListenCallbackFunc) DispatchCallback ¶
func (fn ListenCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type NetworkInterface ¶
type NetworkInterface struct {
// Name is "NetworkInterface.name"
//
// Optional
Name js.String
// Address is "NetworkInterface.address"
//
// Optional
Address js.String
// PrefixLength is "NetworkInterface.prefixLength"
//
// Optional
//
// NOTE: FFI_USE_PrefixLength MUST be set to true to make this field effective.
PrefixLength int32
FFI_USE_PrefixLength bool // for PrefixLength.
FFI_USE bool
}
func (*NetworkInterface) FreeMembers ¶
func (p *NetworkInterface) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (NetworkInterface) FromRef ¶
func (p NetworkInterface) FromRef(ref js.Ref) NetworkInterface
FromRef calls UpdateFrom and returns a NetworkInterface with all fields set.
func (NetworkInterface) New ¶
func (p NetworkInterface) New() js.Ref
New creates a new NetworkInterface in the application heap.
func (*NetworkInterface) Update ¶
func (p *NetworkInterface) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*NetworkInterface) UpdateFrom ¶
func (p *NetworkInterface) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type ReadCallback ¶
func (*ReadCallback[T]) DispatchCallback ¶
func (cb *ReadCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ReadCallbackFunc ¶
func (ReadCallbackFunc) DispatchCallback ¶
func (fn ReadCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type ReadInfo ¶
type ReadInfo struct {
// ResultCode is "ReadInfo.resultCode"
//
// Optional
//
// NOTE: FFI_USE_ResultCode MUST be set to true to make this field effective.
ResultCode int32
// Data is "ReadInfo.data"
//
// Optional
Data js.ArrayBuffer
FFI_USE_ResultCode bool // for ResultCode.
FFI_USE bool
}
func (*ReadInfo) FreeMembers ¶
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (*ReadInfo) UpdateFrom ¶
UpdateFrom copies value of all fields of the heap object to p.
type RecvFromCallback ¶
type RecvFromCallback[T any] struct { Fn func(arg T, this js.Ref, recvFromInfo *RecvFromInfo) js.Ref Arg T }
func (*RecvFromCallback[T]) DispatchCallback ¶
func (cb *RecvFromCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*RecvFromCallback[T]) Register ¶
func (cb *RecvFromCallback[T]) Register() js.Func[func(recvFromInfo *RecvFromInfo)]
type RecvFromCallbackFunc ¶
type RecvFromCallbackFunc func(this js.Ref, recvFromInfo *RecvFromInfo) js.Ref
func (RecvFromCallbackFunc) DispatchCallback ¶
func (fn RecvFromCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (RecvFromCallbackFunc) Register ¶
func (fn RecvFromCallbackFunc) Register() js.Func[func(recvFromInfo *RecvFromInfo)]
type RecvFromInfo ¶
type RecvFromInfo struct {
// ResultCode is "RecvFromInfo.resultCode"
//
// Optional
//
// NOTE: FFI_USE_ResultCode MUST be set to true to make this field effective.
ResultCode int32
// Data is "RecvFromInfo.data"
//
// Optional
Data js.ArrayBuffer
// Address is "RecvFromInfo.address"
//
// Optional
Address js.String
// Port is "RecvFromInfo.port"
//
// Optional
//
// NOTE: FFI_USE_Port MUST be set to true to make this field effective.
Port int32
FFI_USE_ResultCode bool // for ResultCode.
FFI_USE_Port bool // for Port.
FFI_USE bool
}
func (*RecvFromInfo) FreeMembers ¶
func (p *RecvFromInfo) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (RecvFromInfo) FromRef ¶
func (p RecvFromInfo) FromRef(ref js.Ref) RecvFromInfo
FromRef calls UpdateFrom and returns a RecvFromInfo with all fields set.
func (RecvFromInfo) New ¶
func (p RecvFromInfo) New() js.Ref
New creates a new RecvFromInfo in the application heap.
func (*RecvFromInfo) Update ¶
func (p *RecvFromInfo) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*RecvFromInfo) UpdateFrom ¶
func (p *RecvFromInfo) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type SecureCallback ¶
func (*SecureCallback[T]) DispatchCallback ¶
func (cb *SecureCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SecureCallbackFunc ¶
func (SecureCallbackFunc) DispatchCallback ¶
func (fn SecureCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SecureOptions ¶
type SecureOptions struct {
// TlsVersion is "SecureOptions.tlsVersion"
//
// Optional
//
// NOTE: TlsVersion.FFI_USE MUST be set to true to get TlsVersion used.
TlsVersion TLSVersionConstraints
FFI_USE bool
}
func (*SecureOptions) FreeMembers ¶
func (p *SecureOptions) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (SecureOptions) FromRef ¶
func (p SecureOptions) FromRef(ref js.Ref) SecureOptions
FromRef calls UpdateFrom and returns a SecureOptions with all fields set.
func (SecureOptions) New ¶
func (p SecureOptions) New() js.Ref
New creates a new SecureOptions in the application heap.
func (*SecureOptions) Update ¶
func (p *SecureOptions) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*SecureOptions) UpdateFrom ¶
func (p *SecureOptions) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type SendToCallback ¶
type SendToCallback[T any] struct { Fn func(arg T, this js.Ref, writeInfo *WriteInfo) js.Ref Arg T }
func (*SendToCallback[T]) DispatchCallback ¶
func (cb *SendToCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SendToCallbackFunc ¶
func (SendToCallbackFunc) DispatchCallback ¶
func (fn SendToCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetKeepAliveCallback ¶
func (*SetKeepAliveCallback[T]) DispatchCallback ¶
func (cb *SetKeepAliveCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetKeepAliveCallbackFunc ¶
func (SetKeepAliveCallbackFunc) DispatchCallback ¶
func (fn SetKeepAliveCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetMulticastLoopbackModeCallback ¶
type SetMulticastLoopbackModeCallback[T any] struct { Fn func(arg T, this js.Ref, result int32) js.Ref Arg T }
func (*SetMulticastLoopbackModeCallback[T]) DispatchCallback ¶
func (cb *SetMulticastLoopbackModeCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetMulticastLoopbackModeCallbackFunc ¶
func (SetMulticastLoopbackModeCallbackFunc) DispatchCallback ¶
func (fn SetMulticastLoopbackModeCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetMulticastTimeToLiveCallback ¶
type SetMulticastTimeToLiveCallback[T any] struct { Fn func(arg T, this js.Ref, result int32) js.Ref Arg T }
func (*SetMulticastTimeToLiveCallback[T]) DispatchCallback ¶
func (cb *SetMulticastTimeToLiveCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetMulticastTimeToLiveCallbackFunc ¶
func (SetMulticastTimeToLiveCallbackFunc) DispatchCallback ¶
func (fn SetMulticastTimeToLiveCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetNoDelayCallback ¶
func (*SetNoDelayCallback[T]) DispatchCallback ¶
func (cb *SetNoDelayCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SetNoDelayCallbackFunc ¶
func (SetNoDelayCallbackFunc) DispatchCallback ¶
func (fn SetNoDelayCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type SocketInfo ¶
type SocketInfo struct {
// SocketType is "SocketInfo.socketType"
//
// Optional
SocketType SocketType
// Connected is "SocketInfo.connected"
//
// Optional
//
// NOTE: FFI_USE_Connected MUST be set to true to make this field effective.
Connected bool
// PeerAddress is "SocketInfo.peerAddress"
//
// Optional
PeerAddress js.String
// PeerPort is "SocketInfo.peerPort"
//
// Optional
//
// NOTE: FFI_USE_PeerPort MUST be set to true to make this field effective.
PeerPort int32
// LocalAddress is "SocketInfo.localAddress"
//
// Optional
LocalAddress js.String
// LocalPort is "SocketInfo.localPort"
//
// Optional
//
// NOTE: FFI_USE_LocalPort MUST be set to true to make this field effective.
LocalPort int32
FFI_USE_Connected bool // for Connected.
FFI_USE_PeerPort bool // for PeerPort.
FFI_USE_LocalPort bool // for LocalPort.
FFI_USE bool
}
func (*SocketInfo) FreeMembers ¶
func (p *SocketInfo) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (SocketInfo) FromRef ¶
func (p SocketInfo) FromRef(ref js.Ref) SocketInfo
FromRef calls UpdateFrom and returns a SocketInfo with all fields set.
func (SocketInfo) New ¶
func (p SocketInfo) New() js.Ref
New creates a new SocketInfo in the application heap.
func (*SocketInfo) Update ¶
func (p *SocketInfo) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*SocketInfo) UpdateFrom ¶
func (p *SocketInfo) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type SocketType ¶
type SocketType uint32
const ( SocketType_TCP SocketType SocketType_UDP )
func (SocketType) FromRef ¶
func (SocketType) FromRef(str js.Ref) SocketType
func (SocketType) String ¶
func (x SocketType) String() (string, bool)
type TLSVersionConstraints ¶
type TLSVersionConstraints struct {
// Min is "TLSVersionConstraints.min"
//
// Optional
Min js.String
// Max is "TLSVersionConstraints.max"
//
// Optional
Max js.String
FFI_USE bool
}
func (*TLSVersionConstraints) FreeMembers ¶
func (p *TLSVersionConstraints) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (TLSVersionConstraints) FromRef ¶
func (p TLSVersionConstraints) FromRef(ref js.Ref) TLSVersionConstraints
FromRef calls UpdateFrom and returns a TLSVersionConstraints with all fields set.
func (TLSVersionConstraints) New ¶
func (p TLSVersionConstraints) New() js.Ref
New creates a new TLSVersionConstraints in the application heap.
func (*TLSVersionConstraints) Update ¶
func (p *TLSVersionConstraints) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*TLSVersionConstraints) UpdateFrom ¶
func (p *TLSVersionConstraints) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type WriteCallback ¶
func (*WriteCallback[T]) DispatchCallback ¶
func (cb *WriteCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type WriteCallbackFunc ¶
func (WriteCallbackFunc) DispatchCallback ¶
func (fn WriteCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type WriteInfo ¶
type WriteInfo struct {
// BytesWritten is "WriteInfo.bytesWritten"
//
// Optional
//
// NOTE: FFI_USE_BytesWritten MUST be set to true to make this field effective.
BytesWritten int32
FFI_USE_BytesWritten bool // for BytesWritten.
FFI_USE bool
}
func (*WriteInfo) FreeMembers ¶
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (*WriteInfo) UpdateFrom ¶
UpdateFrom copies value of all fields of the heap object to p.