diff --git a/upgrader/public.go b/upgrader/public.go index d082d26..b7dc28d 100644 --- a/upgrader/public.go +++ b/upgrader/public.go @@ -8,8 +8,8 @@ import ( ) type T struct { - req *request.T - res *response.T + Request *request.T + Response *response.T } func Upgrade(s net.Conn) (*T, error) { @@ -18,13 +18,13 @@ func Upgrade(s net.Conn) (*T, error) { inst := new(T) /* (2) Parse request */ - inst.req, _ = request.Parse(s) + inst.Request, _ = request.Parse(s) /* (3) Build response */ - inst.res = inst.req.BuildResponse() + inst.Response = inst.Request.BuildResponse() /* (4) Write into socket */ - _, err := inst.res.Send(s) + _, err := inst.Response.Send(s) if err != nil { return inst, fmt.Errorf("Socket write error: %s", err) }