Skip to content

Commit

Permalink
change the signature of receiver method
Browse files Browse the repository at this point in the history
  • Loading branch information
lonng committed Apr 21, 2017
1 parent 0c875ad commit 2ccb9b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func (s *UDPSession) kcpInput(data []byte) {
}
}

func (s *UDPSession) receiver(ch chan []byte) {
func (s *UDPSession) receiver(ch chan <- []byte) {
for {
data := xmitBuf.Get().([]byte)[:mtuLimit]
if n, _, err := s.conn.ReadFrom(data); err == nil && n >= s.headerSize+IKCP_OVERHEAD {
Expand Down Expand Up @@ -749,7 +749,7 @@ func (l *Listener) monitor() {
}
}

func (l *Listener) receiver(ch chan inPacket) {
func (l *Listener) receiver(ch chan <- inPacket) {
for {
data := xmitBuf.Get().([]byte)[:mtuLimit]
if n, from, err := l.conn.ReadFrom(data); err == nil && n >= l.headerSize+IKCP_OVERHEAD {
Expand Down

0 comments on commit 2ccb9b1

Please sign in to comment.