]> Sergey Matveev's repositories - btrtrc.git/commitdiff
webseed Client skeleton
authorMatt Joiner <anacrolix@gmail.com>
Sun, 31 May 2020 11:00:44 +0000 (21:00 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 31 May 2020 11:00:44 +0000 (21:00 +1000)
webseed/client.go [new file with mode: 0644]

diff --git a/webseed/client.go b/webseed/client.go
new file mode 100644 (file)
index 0000000..eba6a90
--- /dev/null
@@ -0,0 +1,24 @@
+package webseed
+
+import (
+       "net/http"
+
+       pp "github.com/anacrolix/torrent/peer_protocol"
+)
+
+type RequestSpec = pp.RequestSpec
+
+type Client struct {
+       HttpClient *http.Client
+       Url        string
+
+       requests map[RequestSpec]request
+}
+
+type request struct {
+       cancel func()
+}
+
+func (cl *Client) Request(r RequestSpec) {
+       //cl.HttpClient.Do()
+}