Refactored package structure.

This commit is contained in:
Jay
2026-04-17 14:53:29 -04:00
parent c14d04f7b3
commit 3af3696d86
29 changed files with 1210 additions and 1259 deletions

20
types/types.go Normal file
View File

@@ -0,0 +1,20 @@
package types
import (
"net/http"
"time"
)
type Dialer interface {
Dial(urlStr string, requestHeader http.Header) (Socket, *http.Response, error)
}
type Socket interface {
WriteMessage(messageType int, data []byte) error
ReadMessage() (messageType int, p []byte, err error)
Close() error
SetReadDeadline(t time.Time) error
SetWriteDeadline(t time.Time) error
SetCloseHandler(h func(code int, text string) error)
}