feature: Adds basic UDP support.
This commit is contained in:
parent
15176831e6
commit
f8a4fe00a0
3 changed files with 183 additions and 7 deletions
|
@ -213,7 +213,7 @@ func Unmarshal(conn io.Reader) (interface{}, error) {
|
|||
|
||||
if protocolBytes[0] == TCP {
|
||||
protocol = "tcp"
|
||||
} else if protocolBytes[1] == UDP {
|
||||
} else if protocolBytes[0] == UDP {
|
||||
protocol = "udp"
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid protocol")
|
||||
|
@ -270,7 +270,7 @@ func Unmarshal(conn io.Reader) (interface{}, error) {
|
|||
|
||||
if protocolBytes[0] == TCP {
|
||||
protocol = "tcp"
|
||||
} else if protocolBytes[1] == UDP {
|
||||
} else if protocolBytes[0] == UDP {
|
||||
protocol = "udp"
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid protocol")
|
||||
|
@ -364,7 +364,7 @@ func Unmarshal(conn io.Reader) (interface{}, error) {
|
|||
|
||||
if protocolBytes[0] == TCP {
|
||||
protocol = "tcp"
|
||||
} else if protocolBytes[1] == UDP {
|
||||
} else if protocolBytes[0] == UDP {
|
||||
protocol = "udp"
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid protocol")
|
||||
|
@ -523,7 +523,7 @@ func Unmarshal(conn io.Reader) (interface{}, error) {
|
|||
|
||||
if protocolBytes[0] == TCP {
|
||||
protocol = "tcp"
|
||||
} else if protocolBytes[1] == UDP {
|
||||
} else if protocolBytes[0] == UDP {
|
||||
protocol = "udp"
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid protocol")
|
||||
|
@ -580,7 +580,7 @@ func Unmarshal(conn io.Reader) (interface{}, error) {
|
|||
|
||||
if protocolBytes[0] == TCP {
|
||||
protocol = "tcp"
|
||||
} else if protocolBytes[1] == UDP {
|
||||
} else if protocolBytes[0] == UDP {
|
||||
protocol = "udp"
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid protocol")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue