diff --git a/readme.md b/readme.md
index 2c9b52e479b4473659b3f907d11db3fbd35dfd03..a01f96452263fa78b1d558ebf90b83b140bd02b6 100644
--- a/readme.md
+++ b/readme.md
@@ -1,13 +1,12 @@
## jrpc
-it is a jsonrpc2-like framework, allowing for json rpc over multiple different protocols.
-
-it also has interfaces similar to chi for routing, middleware, etc.
-
-different transports are defined, such as http, websocket, or ipc, (net.Conn), stdio (io.Reader/io.Writer)
-
-it also supports subscriptions, such as those in the original ethereum json-rpc specification
-
-it is based off of the http router chi, and the go-ethereum, sourcegraph, and gopls json-rpc packages.
+this is a bottom up implementation of jsonrpc2, primarily made for hosting eth-like jsonrpc requests.
+structure:
+```
+conn.go - defines the interface a json rpc client
+jrpc.go - define the Handler, HandlerFunc, and ResponseWriter
+request.go - define Request, along with json marshaling for the request
+response.go - define Response, along with json marshaling for the response
+```
diff --git a/response.go b/response.go
index 97b3a9940c9246c239402568fe5686fe7dcfe712..c7a463c37c25e3826850e040410a4af6169c6cf5 100644
--- a/response.go
+++ b/response.go
@@ -2,7 +2,6 @@ package jrpc
import (
"encoding/json"
- "net/http"
"gfx.cafe/open/jrpc/codec"
)
@@ -26,76 +25,3 @@ func (r *Response) Msg() *codec.Message {
}
return out
}
-
-type ResponseWriterMsg struct {
- r *Request
- resp *Response
-}
-
-type options struct {
-}
-
-func NewReaderResponseWriterMsg(r *Request) *ResponseWriterMsg {
- rw := &ResponseWriterMsg{
- r: r,
- resp: &Response{
- ID: r.ID,
- },
- }
- return rw
-}
-
-func (w *ResponseWriterMsg) Header() http.Header {
- wh := w.r.Peer.HTTP.Headers
- if wh == nil {
- wh = http.Header{}
- }
- return wh
-}
-
-func (w *ResponseWriterMsg) Option(k string, v any) {
-}
-
-func (w *ResponseWriterMsg) Send(args any, e error) (err error) {
- if e != nil {
- if c, ok := e.(*codec.JsonError); ok {
- w.resp.Error = c
- } else {
- w.resp.Error = &codec.JsonError{
- Code: codec.ErrorCodeApplication,
- Message: e.Error(),
- }
- }
- ec, ok := e.(codec.Error)
- if ok {
- w.resp.Error.Code = ec.ErrorCode()
- }
- de, ok := e.(codec.DataError)
- if ok {
- w.resp.Error.Data = de.ErrorData()
- }
- return nil
- }
- w.resp.Result, err = json.Marshal(args)
- if err != nil {
- w.resp.Error = &codec.JsonError{
- Code: -32603,
- Message: err.Error(),
- }
- return nil
- }
- return nil
-}
-
-// TODO: implement
-func (w *ResponseWriterMsg) Notify(args any) (err error) {
- return nil
-}
-
-func (w *ResponseWriterMsg) Response() *Response {
- return w.resp
-}
-
-func (w *ResponseWriterMsg) Msg() *codec.Message {
- return w.resp.Msg()
-}