Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
At time.Time
Sent []int // the sizes of the client's packets
Answered []Count // the types the server sent after
}
Action is a moment the player acted, as the client's packets show it.
type Analysis ¶
type Analysis struct {
Server, Client netip.AddrPort
Pairs int // server and client pairs the decoder locked on
Start time.Time // the recording's first message, which a2k show counts from
First, Last time.Time // the pair's first and last message or client packet
Messages []Message // the server's, by time
Packets int // the client's packets that carried data
Usual []int // the sizes the client sends every second or so, in order
Background []wire.Opcode // what the server sends whether the player acts or not, in order
Summary Summary // of the whole recording
// contains filtered or unexported fields
}
Analysis is a recording read for what its message types are, and what answered the player.
func (*Analysis) Actions ¶
Actions finds when the client sent packets of a size it does not send all the time, one within burstGap of the last joining its action, and what the server sent within window after, or until the next action.
type Connection ¶ added in v0.5.0
type Connection struct {
Client, Server netip.AddrPort
IfIndex int // the adapter it was seen on, a packet seen on two is two connections
Start, End time.Time
SYN, SYNACK int
FIN, RST bool
Sent, Received int
Game bool
Status string
}
Connection is one TCP connection as a recording shows it, from its first packet to its last.
func Connections ¶ added in v0.5.0
func Connections(name string, cfg Config) ([]Connection, error)
Connections lists a recording's TCP connections in the order they began, with what became of each, and marks the game's.
func (Connection) Failed ¶ added in v0.5.0
func (c Connection) Failed() bool
type Detail ¶
type Detail struct {
Messages []Message // the type's, by time
Sizes map[int]int // payload size to messages
Longest int // the longest payload
Bytes []map[byte]int // for each of the first positions, how often it took each value
Values int // the values the first varint of a payload takes
}
Detail is one type's messages, position by position.
type Message ¶
type Message struct {
wire.Frame
Event game.Event // nil unless game reads it
Err error // game.ErrUnread, or one wrapping game.ErrLayout
}
Message is one of the game's frames, and what game reads of it.
type Reader ¶
type Summary ¶
type Summary struct {
wire.Stats // Analytical stats of the source read
Messages int // the game's messages
Decoded int // those game reads
Unread int // those it does not read yet
Failed int // those whose bytes do not fit what it reads, most likely after a game patch
CutShort int // segments the recording cut short, whose bytes are lost
Lost error // what a live capture lost without failing, once it is closed
}
type TypeStat ¶
type TypeStat struct {
Type wire.Opcode
Sizes map[int]int // payload size to messages
Count int // the total number of messages of this type
Decoded int // those game reads
Failed int // those off the layout game reads
Background bool // it comes whether the player acts or not
// with marks
Marks int // the marks it followed within the window
Within int // its messages inside a mark's window
Idle float64 // its messages a second outside the windows, NaN if they cover the session
}
TypeStat is what the messages of one type add up to.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package a2log is the fight log: a Header line, then one Frame a line, each a JSON object.
|
Package a2log is the fight log: a Header line, then one Frame a line, each a JSON object. |
|
Package capture reads TCP segments from pcap and pcapng files, and from a live device.
|
Package capture reads TCP segments from pcap and pcapng files, and from a live device. |
|
cmd
|
|
|
a2k
command
|
|
|
Package game reads the meaning of AION 2 frames, like hits, casts, spawns, deaths, positions and the clocks.
|
Package game reads the meaning of AION 2 frames, like hits, casts, spawns, deaths, positions and the clocks. |
|
internal
|
|
|
genfixtures
command
Genfixtures writes the synthesized test fixtures: TCP payload streams for package wire, and a pcap for package capture, each with the frames it holds.
|
Genfixtures writes the synthesized test fixtures: TCP payload streams for package wire, and a pcap for package capture, each with the frames it holds. |
|
score
command
Score measures the decoder on synthesized captures whose frames are known: how many of them it finds, and how many it makes up.
|
Score measures the decoder on synthesized captures whose frames are known: how many of them it finds, and how many it makes up. |
|
Package wire turns TCP segments into AION 2 game frames.
|
Package wire turns TCP segments into AION 2 game frames. |