mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-06-16 22:25:08 +03:00
Renamed methods, changed comments
This commit is contained in:
parent
3a61727348
commit
2aa8913151
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue