package
0.0.0-20241110145701-0f0eebf881b3
Repository: https://github.com/optimism-java/utp-go.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
GetGlobalStats returns a snapshot of the current GlobalStats counts.
GetUDPMTU returns a best guess as to the MTU (maximum transmission unit) on the network to which the specified address belongs (IPv4 or IPv6).
NewConnIdGenerator creates a new instance of DefaultConnIdGenerator.
NewSocketMultiplexer creates a new instance of SocketMultiplexer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
AckOverhead is the class of data used to communicate acknowledgement of data received.
CloseOverhead is the class of data used for bytes which are used to indicate that a connection should be closed.
ConnectOverhead is the class of data used for bytes which are used to negotiate connections with a remote peer.
DynamicPacketSizeEnabled controls whether this µTP endpoint will limit outgoing packets to a maximum of getMaxPacketSize() bytes.
DynamicPacketSizeFactor is entirely unused and is also probably vestigial, related to DynamicPacketSizeEnabled.
HeaderOverhead is the class of data used for bytes in µTP packet headers.
PayloadBandwidth is the class of data which was directly specified by the application layer.
RetransmitOverhead is the class of data used for bytes that are retransmissions of data previously sent as PayloadBandwidth.
SO_UTPVERSION is the option name used to set the version of µTP to use in outgoing connections.
StateConnect is the state wherein a socket has received syn-ack (notification only for outgoing connection completion) (although I don't know exactly what the previous parenthetical means).
StateDestroying indicates that the socket is being destroyed, meaning all data has been sent if possible.
StateEOF is the state used for a socket when its connection is closed.
StateWritable is the state wherein a socket is able to send more data.
No description provided by the author
# Structs
CallbackTable contains a table of callbacks to be used by a Socket.
ConnId holds id to be used to accepted connection by the utp server.
DefaultConnIdGenerator default connection id generator, it will generate random connection id.
GlobalStats encapsulates statistics pertaining to all use of utp-go since the library was loaded.
Socket represents a µTP socket, which roughly corresponds to one connection to an internet peer.
No description provided by the author
SocketMultiplexer coordinates µTP sockets that are sharing a single underlying PacketConn.
Stats collects statistics for a particular Socket when utp-go is built with the 'utpstats' build tag.
# Interfaces
ConnIdGenerator generates connection id.
# Type aliases
BandwidthType represents different classes of data which may be exchanged in the course of µTP connections.
GetRBSizeCallback is the type of callback to be used when a socket needs to know the current size of the read buffer (how many bytes have been received by OnReadCallback, but have not yet been processed).
GotIncomingConnection is the type of callback to be called when a new incoming µTP connection has been established by the socket layer.
OnErrorCallback is the type of callback to be used when something goes wrong with a connection.
OnOverheadCallback is the type of callback to be used when any data is sent over the network.
OnReadCallback is the type of callback to be used when a socket has received application data from the peer.
OnStateChangeCallback is the type of callback to be used when a socket changes its socket state.
OnWriteCallback is the type of callback to be used when a socket is ready to send more application data to the peer.
PacketSendCallback is the type of callback to be used when the µTP socket layer wants to transmit data over the underlying packet connection (which is probably UDP).
State represents the state of a µTP socket.