Compare commits
2 Commits
bb14ec20a7
...
0727609067
| Author | SHA1 | Date | |
|---|---|---|---|
| 0727609067 | |||
| 968e145cda |
@ -7,7 +7,7 @@ import "log"
|
||||
import "net"
|
||||
import "time"
|
||||
import "errors"
|
||||
import "context"
|
||||
// import "context"
|
||||
import "git.tebibyte.media/sashakoshka/hopp"
|
||||
import "git.tebibyte.media/sashakoshka/hopp/examples/ping"
|
||||
|
||||
@ -59,7 +59,7 @@ func dial(address string) (hopp.Conn, error) {
|
||||
// return conn, nil
|
||||
underlying, err := net.Dial("tcp", address)
|
||||
if err != nil { return nil, err }
|
||||
conn := hopp.AdaptA(underlying, hopp.PartyClient)
|
||||
conn := hopp.AdaptA(underlying, hopp.ServerSide)
|
||||
return conn, nil
|
||||
}
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ type writerA struct {
|
||||
}
|
||||
|
||||
func (this *writerA) Write(data []byte) (n int, err error) {
|
||||
if !this.open { return 0, io.EOF }
|
||||
if !this.open || this.parent.closed.Load() { return 0, io.EOF }
|
||||
toSend := data
|
||||
for len(toSend) > 0 {
|
||||
nn, err := this.writeOne(toSend)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user