maybe
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m58s

This commit is contained in:
matst80
2024-11-10 21:43:40 +01:00
parent 0f3b22e8da
commit c70c5cd930
12 changed files with 84 additions and 153 deletions

View File

@@ -7,11 +7,11 @@ import (
func TestTcpHelpers(t *testing.T) {
server, err := Listen(":1337")
server, err := Listen("localhost:51337")
if err != nil {
t.Errorf("Error listening: %v\n", err)
}
client, err := Dial("localhost:1337")
client, err := Dial("localhost:51337")
if err != nil {
t.Errorf("Error dialing: %v\n", err)
}
@@ -21,7 +21,7 @@ func TestTcpHelpers(t *testing.T) {
messageData = string(data)
return nil
})
server.HandleCall(2, func(data []byte) (uint16, []byte, error) {
server.HandleCall(2, func(data []byte) (uint32, []byte, error) {
log.Printf("Received call: %s\n", string(data))
return 3, []byte("Hello, client!"), nil
})