Documentation
¶
Index ¶
Constants ¶
View Source
const (
// SemVer is the semantic version of this program
SemVer = "0.2.1"
)
Variables ¶
View Source
var ( // ErrorDisconnected indicates that this socket is disconnected. ErrorDisconnected = errors.New("Socket is disconnected") )
Functions ¶
func AnsiFormatLineParts ¶
AnsiFormatLineParts takes line parts and returns a formatted string with ANSI codes.
func SplitLineIntoParts ¶
SplitLineIntoParts splits the given IRC line into separate parts.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(config ConnectionConfig, hiddenCommands *map[string]bool) (*Connection, error)
NewConnection returns a new Connection.
func (*Connection) Disconnect ¶
func (conn *Connection) Disconnect()
Disconnect disconnects from the server.
func (*Connection) GetLine ¶
func (conn *Connection) GetLine() (string, error)
GetLine returns a single line from our socket.
func (*Connection) SendLine ¶
func (conn *Connection) SendLine(line string) error
SendLine sends an IRC line to the socket.
type ConnectionConfig ¶
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket appropriately buffers IRC lines.
func ConnectSocket ¶
ConnectSocket connects to the given host/port and starts our receivers if appropriate.
func MakeSocket ¶ added in v0.2.0
MakeSocket makes a socket from the given connection.
func (*Socket) Disconnect ¶
func (s *Socket) Disconnect()
Disconnect severs our connection to the server.
Click to show internal directories.
Click to hide internal directories.