Documentation ¶
Index ¶
- func CipherTest()
- type CFB8
- type IncomingPacketStream
- func (s *IncomingPacketStream) Close()
- func (s *IncomingPacketStream) EnableAsyncRead()
- func (s *IncomingPacketStream) GetPacket() *packet.IncomingPacket
- func (s *IncomingPacketStream) GetState() byte
- func (s *IncomingPacketStream) ReadData() bool
- func (s *IncomingPacketStream) SetCipher(stream cipher.Stream)
- func (s *IncomingPacketStream) SetCompression(threshold int32)
- func (s *IncomingPacketStream) SetState(state byte)
- type OutgoingPacketStream
- func (s *OutgoingPacketStream) Close()
- func (s *OutgoingPacketStream) EnableAsyncSend()
- func (s *OutgoingPacketStream) Flush()
- func (s *OutgoingPacketStream) NewPacket() *packet.OutgoingPacket
- func (s *OutgoingPacketStream) NewPacketID(id int32) *packet.OutgoingPacket
- func (s *OutgoingPacketStream) SendProto(version mpacket.Version, proto *pb.Packet)
- func (s *OutgoingPacketStream) SetCipher(stream cipher.Stream)
- func (s *OutgoingPacketStream) SetCompression(threshold int32)
- func (s *OutgoingPacketStream) Write(packet *packet.OutgoingPacket)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CipherTest ¶
func CipherTest()
Types ¶
type CFB8 ¶
type CFB8 struct {
// contains filtered or unexported fields
}
CFB stream with 8 bit segment size See http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
func (*CFB8) XORKeyStream ¶
type IncomingPacketStream ¶
type IncomingPacketStream struct {
// contains filtered or unexported fields
}
func NewIncomingPacketStream ¶
func NewIncomingPacketStream(conn net.Conn, closed *atomic.Value) *IncomingPacketStream
func (*IncomingPacketStream) Close ¶
func (s *IncomingPacketStream) Close()
func (*IncomingPacketStream) EnableAsyncRead ¶
func (s *IncomingPacketStream) EnableAsyncRead()
func (*IncomingPacketStream) GetPacket ¶
func (s *IncomingPacketStream) GetPacket() *packet.IncomingPacket
func (*IncomingPacketStream) GetState ¶
func (s *IncomingPacketStream) GetState() byte
func (*IncomingPacketStream) ReadData ¶
func (s *IncomingPacketStream) ReadData() bool
func (*IncomingPacketStream) SetCipher ¶
func (s *IncomingPacketStream) SetCipher(stream cipher.Stream)
func (*IncomingPacketStream) SetCompression ¶
func (s *IncomingPacketStream) SetCompression(threshold int32)
func (*IncomingPacketStream) SetState ¶
func (s *IncomingPacketStream) SetState(state byte)
type OutgoingPacketStream ¶
type OutgoingPacketStream struct {
// contains filtered or unexported fields
}
func NewOutgoingPacketStream ¶
func NewOutgoingPacketStream( conn io.WriteCloser, closed *atomic.Value, length_threshold int, time_threshold time.Duration, ) *OutgoingPacketStream
func (*OutgoingPacketStream) Close ¶
func (s *OutgoingPacketStream) Close()
This is not thread safe! Do not call Close() on different threads close to each other. If you call it once, it is safe to call again, but you should not call close twice at the same time.
func (*OutgoingPacketStream) EnableAsyncSend ¶
func (s *OutgoingPacketStream) EnableAsyncSend()
func (*OutgoingPacketStream) Flush ¶
func (s *OutgoingPacketStream) Flush()
func (*OutgoingPacketStream) NewPacket ¶
func (s *OutgoingPacketStream) NewPacket() *packet.OutgoingPacket
func (*OutgoingPacketStream) NewPacketID ¶
func (s *OutgoingPacketStream) NewPacketID(id int32) *packet.OutgoingPacket
func (*OutgoingPacketStream) SendProto ¶
func (s *OutgoingPacketStream) SendProto(version mpacket.Version, proto *pb.Packet)
func (*OutgoingPacketStream) SetCipher ¶
func (s *OutgoingPacketStream) SetCipher(stream cipher.Stream)
func (*OutgoingPacketStream) SetCompression ¶
func (s *OutgoingPacketStream) SetCompression(threshold int32)
func (*OutgoingPacketStream) Write ¶
func (s *OutgoingPacketStream) Write(packet *packet.OutgoingPacket)
Click to show internal directories.
Click to hide internal directories.