feat: change project structure

This commit is contained in:
2025-04-16 13:14:10 +02:00
parent 9c55ea257d
commit 83b2368ba1
7 changed files with 574 additions and 0 deletions

28
hsp/client/client.go Normal file
View File

@ -0,0 +1,28 @@
package client
import (
"net"
"github.com/LandaMm/hsp-go/hsp"
)
type Client struct {
Duplex *hsp.PacketDuplex
}
func NewClient() *Client {
return &Client{
Duplex: nil,
}
}
func (c *Client) SendRequest(req *hsp.Request, address string) (*hsp.Response, error) {
// TODO: Parse pathname
conn, err := net.Dial("tcp", address)
if err != nil {
return nil, err
}
c.Duplex = hsp.NewPacketDuplex(conn)
}