Documentation ¶
Overview ¶
Package connection encapsulates connection creation process and provides connection factories.
Usage
factory := connection.NewConnectionFactory() connection := factory.Create("127.0.0.1:8080") defer connection.close() // You have to manually close connection
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface {
Create(address string) (net.PacketConn, error)
}
Factory allows to create new connections.
func NewConnectionFactory ¶
func NewConnectionFactory() Factory
NewConnectionFactory returns default UDP connection.
Click to show internal directories.
Click to hide internal directories.