support udp type

This commit is contained in:
fatedier
2016-12-19 01:22:21 +08:00
parent adcb2c1ea5
commit f2999e3317
18 changed files with 556 additions and 76 deletions

View File

@@ -40,6 +40,6 @@ func echoWorker(c *conn.Conn) {
return
}
c.Write(buff)
c.WriteString(buff)
}
}

View File

@@ -26,7 +26,7 @@ func TestEchoServer(t *testing.T) {
timer := time.Now().Add(time.Duration(5) * time.Second)
c.SetDeadline(timer)
c.Write(ECHO_TEST_STR)
c.WriteString(ECHO_TEST_STR)
buff, err := c.ReadLine()
if err != nil {