Documentation ¶
Index ¶
- type Addr
- type Client
- type Conn
- func (c Conn) Close() error
- func (c Conn) LocalAddr() net.Addr
- func (c Conn) Read(b []byte) (int, error)
- func (c Conn) RemoteAddr() net.Addr
- func (c Conn) SetDeadline(t time.Time) error
- func (c Conn) SetReadDeadline(t time.Time) error
- func (c Conn) SetWriteDeadline(t time.Time) error
- func (c Conn) Write(b []byte) (int, error)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr struct { // Callsign is the raw AX.25 callsign as a series of bytes. This is not // ASCII encoded. If you require a string version of the callsign, // please call Addr.String(). Callsign [C.PATTY_AX25_CALLSTRLEN]byte // Callsign is the raw AX.25 SSID as a byte. This is already encoded. // If you require a string version of the callsign, please call // Addr.String(), and do not rely on fmt.Sprintf("%d"). SSID uint8 }
Addr is an AX.25 callsign.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds an open connection to a running pattyd process, to enable communication with remote AX.25 hosts.
func Open ¶
Open will create a new patty client, which communicates with a running pattyd process, via the passed UNIX Socket.
func (Client) Close ¶
Close will free any underlying resources held by the provided connection to the pattyd process.
func (*Client) Dial ¶
Dial will initiate an AX.25 socket connection to a remote station denoted by a callsign and SSID (such as K3XEC-1).
The only network param supported is currently 'ax25'.
func (*Client) Listen ¶
Listen will listen for incoming requests to our station, handshake with them, and return the connection back to our consuming Go code.
'network' must be "ax25", and 'address' is your callsign (e.g., K3XEC-10)
This returns a net.Listener, which can be used in the Go stdlib to make connections using AX.25.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is an active patty AX.25 Connection.
This type implements the net.Conn interface, and will be returned by the Listener type.
func (Conn) LocalAddr ¶
LocalAddr is part of the net.Conn Interface.
LocalAddr return the local station callsign. For instance, if my station is K3XEC-1, and the remote callsign is N0CALL-9, the LocalAddr is K3XEC-1.
func (Conn) RemoteAddr ¶
RemoteAddr is part of the net.Conn Interface.
LocalAddr return the local station callsign. For instance, if my station is K3XEC-1, and the remote callsign is N0CALL-9, the RemoteAddr is N0CALL-9
func (Conn) SetDeadline ¶
SetDeadline is part of the net.Conn Interface.
This is not currently implemented, and will return an error if called.
func (Conn) SetReadDeadline ¶
SetReadDeadline is part of the net.Conn Interface.
This is not currently implemented, and will return an error if called.
func (Conn) SetWriteDeadline ¶
SetWriteDeadline is part of the net.Conn Interface.
This is not currently implemented, and will return an error if called.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is the type returned by Client.Listen; and implements the net.Listener interface.