[go-nuts] Re: golang tcp transport just like nc

2018-03-08 Thread suconghou
'my id is 3' > /tmp/3 > rm -rf /tmp/2 /tmp/4 > > > > > > ./nc serer < /tmp/1 > /tmp/2 > > > > ./nc < /tmp/3 > /tmp/4 > > > > please help me how to solve this and works like nc > > > example code > > https://gist.

[go-nuts] golang tcp transport just like nc

2018-03-07 Thread suconghou
'my id is 1' > /tmp/1 echo 'my id is 3' > /tmp/3 rm -rf /tmp/2 /tmp/4 ./nc serer < /tmp/1 > /tmp/2 ./nc < /tmp/3 > /tmp/4 please help me how to solve this and works like nc example code https://gist.github.com/suconghou/a1bfab9a30b3408400b6382

[go-nuts] How can I make my own reader

2017-06-25 Thread suconghou
package main import ( "io" "log" "os" ) type test struct { name string } func (a *test) Read(p []byte) (int, error) { var size int for { // I want to put large data to response the read ; some data whatever I want ... size = size + 102400 // condition