Documentation ¶
Index ¶
- func ReadString(reader io.Reader) (string, error)
- func WriteString(writer io.Writer, op string, str string) error
- type Addr
- type Addr16
- type Addr4
- type AddrFqdn
- type Family
- type FamilyParser
- type Serializer
- func (s *Serializer) ReadAddress(reader io.Reader) (Addr, error)
- func (s *Serializer) ReadAddressAndPort(reader io.Reader) (addr Addr, port uint16, err error)
- func (s *Serializer) ReadPort(reader io.Reader) (uint16, error)
- func (s *Serializer) WriteAddress(writer io.Writer, addr Addr) error
- func (s *Serializer) WriteAddressAndPort(writer io.Writer, addr Addr, port uint16) error
- func (s *Serializer) WritePort(writer io.Writer, port uint16) error
- type SerializerOption
- type StringTooLongException
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FamilyParser ¶
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
func NewSerializer ¶
func NewSerializer(options ...SerializerOption) *Serializer
func (*Serializer) ReadAddress ¶
func (s *Serializer) ReadAddress(reader io.Reader) (Addr, error)
func (*Serializer) ReadAddressAndPort ¶
func (*Serializer) WriteAddress ¶
func (s *Serializer) WriteAddress(writer io.Writer, addr Addr) error
func (*Serializer) WriteAddressAndPort ¶
type SerializerOption ¶
type SerializerOption func(*Serializer)
func AddressFamilyByte ¶
func AddressFamilyByte(b byte, f Family) SerializerOption
func PortThenAddress ¶
func PortThenAddress() SerializerOption
func WithFamilyParser ¶
func WithFamilyParser(fp FamilyParser) SerializerOption
type StringTooLongException ¶
func (StringTooLongException) Error ¶
func (e StringTooLongException) Error() string
Click to show internal directories.
Click to hide internal directories.