Documentation ¶
Index ¶
- type ConnectionStatus
- type PWPNode
- type PWPStatus
- type ReceiveWorker
- type TorrentSession
- func (s *TorrentSession) AwaitHandshake() bool
- func (s *TorrentSession) Close()
- func (s *TorrentSession) GetConnection() net.Conn
- func (s *TorrentSession) Receive(conn net.Conn) (string, error)
- func (s *TorrentSession) Send(data interface{}) error
- func (s *TorrentSession) SendMessage(msg message.PWPMessage) error
- func (s *TorrentSession) Start()
- func (s *TorrentSession) StartHandshake() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionStatus ¶
type ConnectionStatus struct {
HandshakeComplete bool // NOT USED
}
type ReceiveWorker ¶
type ReceiveWorker struct {
// contains filtered or unexported fields
}
func NewReceiveWorker ¶
func NewReceiveWorker(reader bencode.BencodeReader, recvChan chan []byte, log *logging.Logger) *ReceiveWorker
func (*ReceiveWorker) Start ¶
func (w *ReceiveWorker) Start()
type TorrentSession ¶
type TorrentSession struct { PWPStatus PWPStatus ConnectionStatus *ConnectionStatus // contains filtered or unexported fields }
func NewTorrentSession ¶
func NewTorrentSession(connection net.Conn, log *logging.Logger) *TorrentSession
func (*TorrentSession) AwaitHandshake ¶
func (s *TorrentSession) AwaitHandshake() bool
func (*TorrentSession) Close ¶
func (s *TorrentSession) Close()
func (*TorrentSession) GetConnection ¶
func (s *TorrentSession) GetConnection() net.Conn
func (*TorrentSession) Send ¶
func (s *TorrentSession) Send(data interface{}) error
func (*TorrentSession) SendMessage ¶
func (s *TorrentSession) SendMessage(msg message.PWPMessage) error
func (*TorrentSession) Start ¶
func (s *TorrentSession) Start()
func (*TorrentSession) StartHandshake ¶
func (s *TorrentSession) StartHandshake() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.