2024-09-25 22:56:40 +03:00
|
|
|
package servers
|
|
|
|
|
|
|
|
import "net"
|
|
|
|
|
2024-09-28 19:26:08 +03:00
|
|
|
// The type represents authentication request
|
|
|
|
// from clients.
|
|
|
|
type ClientAuthRequest struct {
|
|
|
|
Login Login
|
|
|
|
Password Password
|
|
|
|
}
|
|
|
|
|
|
|
|
// The type represents the controlling client.
|
2024-09-25 22:56:40 +03:00
|
|
|
type Client struct {
|
|
|
|
conn net.Conn
|
|
|
|
}
|
|
|
|
|
2024-09-28 19:26:08 +03:00
|
|
|
// Returns the new client on the specified connection.
|
2024-09-25 22:56:40 +03:00
|
|
|
func NewClient(conn net.Conn) *Client {
|
|
|
|
ret := &Client{}
|
|
|
|
ret.conn = conn
|
|
|
|
return ret
|
|
|
|
}
|