Renamed methods, changed comments

This commit is contained in:
Revertron 2022-11-01 12:57:20 +01:00 committed by GitHub
parent 3a61727348
commit 2aa8913151
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,8 +115,8 @@ func (m *Yggdrasil) Send(p []byte) error {
return nil return nil
} }
// Send sends a packet to Yggdrasil. It should be a fully formed IPv6 packet // Send sends a packet from given buffer to Yggdrasil. From first byte up to length.
func (m *Yggdrasil) SendBytes(p []byte, length int) error { func (m *Yggdrasil) SendBuffer(p []byte, length int) error {
if m.iprwc == nil { if m.iprwc == nil {
return nil return nil
} }
@ -138,9 +138,8 @@ func (m *Yggdrasil) Recv() ([]byte, error) {
return buf[:n], nil return buf[:n], nil
} }
// Recv waits for and reads a packet coming from Yggdrasil to given buffer, returning length of it // Recv waits for and reads a packet coming from Yggdrasil to given buffer, returning size of packet
// It will be a fully formed IPv6 packet func (m *Yggdrasil) RecvBuffer(buf []byte) (int, error) {
func (m *Yggdrasil) RecvBytes(buf []byte) (int, error) {
if m.iprwc == nil { if m.iprwc == nil {
return 0, nil return 0, nil
} }