Versions in this module Expand all Collapse all v1 v1.0.172 Jan 22, 2025 Changes in this version + const DtxMessageHeaderLength + const DtxMessageMagic + const DtxMessagePayloadHeaderLength + const DtxReservedBits + var ErrConnectionClosed = errors.New("Connection closed") + func BuildAckMessage(msg Message) []byte + func Decompress(data []byte) ([]byte, error) + func Encode(Identifier int, ConversationIndex int, ChannelCode int, ExpectsReply bool, ...) ([]byte, error) + func IsIncomplete(err error) bool + func IsOutOfSync(err error) bool + func NewIncomplete(message string) error + func NewOutOfSync(message string) error + func SendAckIfNeeded(dtxConn *Connection, msg Message) + type AuxiliaryEncoder struct + func (a *AuxiliaryEncoder) AddNsKeyedArchivedObject(object interface{}) + func (a *AuxiliaryEncoder) GetBytes() []byte + type AuxiliaryHeader struct + AuxiliarySize uint32 + BufferSize uint32 + Unknown uint32 + Unknown2 uint32 + func (a AuxiliaryHeader) String() string + type Channel struct + func (d *Channel) AddResponseWaiter(identifier int, channel chan Message) + func (d *Channel) Dispatch(msg Message) + func (d *Channel) MethodCall(selector string, args ...interface{}) (Message, error) + func (d *Channel) MethodCallAsync(selector string, args ...interface{}) error + func (d *Channel) MethodCallWithAuxiliary(selector string, aux PrimitiveDictionary) (Message, error) + func (d *Channel) ReceiveMethodCall(selector string) Message + func (d *Channel) RegisterMethodForRemote(selector string) + func (d *Channel) Send(expectsReply bool, messageType MessageType, payloadBytes []byte, ...) error + func (d *Channel) SendAndAwaitReply(expectsReply bool, messageType MessageType, payloadBytes []byte, ...) (Message, error) + type ChannelOption func(*Channel) + func WithTimeout(seconds uint32) ChannelOption + type Connection struct + MessageDispatcher Dispatcher + func NewTunnelConnection(device ios.DeviceEntry, serviceName string) (*Connection, error) + func NewUsbmuxdConnection(device ios.DeviceEntry, serviceName string) (*Connection, error) + func (dtxConn *Connection) AddDefaultChannelReceiver(messageDispatcher Dispatcher) *Channel + func (dtxConn *Connection) Close() error + func (dtxConn *Connection) Closed() <-chan struct{} + func (dtxConn *Connection) Dispatch(msg Message) + func (dtxConn *Connection) Err() error + func (dtxConn *Connection) ForChannelRequest(messageDispatcher Dispatcher) *Channel + func (dtxConn *Connection) GlobalChannel() *Channel + func (dtxConn *Connection) RequestChannelIdentifier(identifier string, messageDispatcher Dispatcher, opts ...ChannelOption) *Channel + func (dtxConn *Connection) Send(message []byte) error + type Dispatcher interface + Dispatch func(msg Message) + func NewGlobalDispatcher(requestChannelMessages chan Message, dtxConnection *Connection) Dispatcher + type FragmentDecoder struct + func NewFragmentDecoder(firstFragment Message) *FragmentDecoder + func (f *FragmentDecoder) AddFragment(fragment Message) bool + func (f FragmentDecoder) Extract() []byte + func (f FragmentDecoder) HasFinished() bool + type GlobalDispatcher struct + func (g GlobalDispatcher) Dispatch(msg Message) + type Message struct + Auxiliary PrimitiveDictionary + AuxiliaryHeader AuxiliaryHeader + ChannelCode int + ConversationIndex int + ExpectsReply bool + FragmentIndex uint16 + Fragments uint16 + Identifier int + MessageLength int + Payload []interface{} + PayloadHeader PayloadHeader + RawBytes []byte + func DecodeNonBlocking(messageBytes []byte) (Message, []byte, error) + func ReadMessage(reader io.Reader) (Message, error) + func (d Message) HasAuxiliary() bool + func (d Message) HasError() bool + func (d Message) HasPayload() bool + func (d Message) IsFirstFragment() bool + func (d Message) IsFragment() bool + func (d Message) IsLastFragment() bool + func (d Message) MessageIsFirstFragmentFor(otherMessage Message) bool + func (d Message) PayloadLength() uint32 + func (d Message) String() string + func (d Message) StringDebug() string + type MessageType uint32 + const Ack + const DtxTypeError + const LZ4CompressedMessage + const Methodinvocation + const ResponseWithReturnValueInPayload + const UnknownTypeOne + func (m MessageType) String() string + type MethodWithResponse func(msg Message) (interface{}, error) + type PayloadHeader struct + AuxiliaryLength uint32 + Flags uint32 + MessageType MessageType + TotalPayloadLength uint32 + func (p PayloadHeader) String() string + type PrimitiveDictionary struct + func DecodeAuxiliary(auxBytes []byte) PrimitiveDictionary + func NewPrimitiveDictionary() PrimitiveDictionary + func (d *PrimitiveDictionary) AddBytes(value []byte) + func (d *PrimitiveDictionary) AddInt32(value int) + func (d *PrimitiveDictionary) AddNsKeyedArchivedObject(object interface{}) + func (d PrimitiveDictionary) GetArguments() []interface{} + func (d PrimitiveDictionary) String() string + func (d PrimitiveDictionary) ToBytes() ([]byte, error) + type PrimitiveKeyValuePair struct