Documentation ¶
Overview ¶
Package conn makes it possible to hide the structure of the true message by encrypting and adding random bytes.
NETWORK CONN FORMAT L(M) || M where L - length (uint64) M - message bytes
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReadFromSocket = &SConnError{"read from socket"} ErrWriteToSocket = &SConnError{"write to socket"} ErrReadHeaderBlock = &SConnError{"read header block"} ErrInvalidMsgSize = &SConnError{"invalid msgSize"} ErrReadHeaderBytes = &SConnError{"read header bytes"} ErrReadBodyBytes = &SConnError{"read body bytes"} ErrInvalidMessageBytes = &SConnError{"invalid message bytes"} ErrSendPayloadBytes = &SConnError{"send payload bytes"} ErrCreateConnection = &SConnError{"create connection"} )
Functions ¶
This section is empty.
Types ¶
type IConn ¶
type IConn interface { types.ICloser GetSettings() ISettings GetSocket() net.Conn GetVSettings() IVSettings SetVSettings(IVSettings) WriteMessage(context.Context, net_message.IMessage) error ReadMessage(context.Context, chan<- struct{}) (net_message.IMessage, error) }
type ISettings ¶
type ISettings interface { GetLimitMessageSizeBytes() uint64 GetLimitVoidSizeBytes() uint64 GetWorkSizeBits() uint64 GetDialTimeout() time.Duration GetReadTimeout() time.Duration GetWriteTimeout() time.Duration GetWaitReadTimeout() time.Duration }
func NewSettings ¶
type IVSettings ¶ added in v1.6.7
type IVSettings interface {
GetNetworkKey() string
}
func NewVSettings ¶ added in v1.6.7
func NewVSettings(pVSett *SVSettings) IVSettings
type SConnError ¶ added in v1.6.8
type SConnError struct {
// contains filtered or unexported fields
}
func (*SConnError) Error ¶ added in v1.6.8
func (err *SConnError) Error() string
type SVSettings ¶ added in v1.6.7
type SVSettings sVSettings
Click to show internal directories.
Click to hide internal directories.