Re: [go-nuts] Re: Why do I get multiple times the same data?

2021-08-18 Thread LetGo
Resetting the buffer was the right solution! Thanks(:! May I ask another tip please? Il giorno venerdì 30 luglio 2021 alle 19:03:41 UTC+2 Vadim Berezniker ha scritto: > fub is declared outside the for loop and io.Copy(&fub, &q) will append to > the buffer. > > On Thu, Jul 29, 2021 at 11:41 AM

Re: [go-nuts] Re: How to implement this in golang?

2021-07-12 Thread LetGo
e commands I enter Il giorno domenica 11 luglio 2021 alle 21:00:41 UTC+2 LetGo ha scritto: > AH sorry! > > It was a really tough day and I tried to code in the worst situation ever, > I was really tired that I did not even noticed how stupid and newbie was > that, sorry

Re: [go-nuts] Re: How to implement this in golang?

2021-07-11 Thread LetGo
nica 11 luglio 2021 alle 21:00:41 UTC+2 LetGo ha scritto: > AH sorry! > > It was a really tough day and I tried to code in the worst situation ever, > I was really tired that I did not even noticed how stupid and newbie was > that, sorry! > PLEASE just ignore m

Re: [go-nuts] Re: How to implement this in golang?

2021-07-11 Thread LetGo
t https://blog.golang.org/index; after you pick up > the core concepts, find some example sockets-based code, run it, modify > it. Stringing together statements, if you don't understand what each > individual statement does, is unlikely to give a useful result. > > On Thursday

Re: [go-nuts] Re: How to implement this in golang?

2021-07-08 Thread LetGo
e basic Go constructs :) > > Glad I could help, and don't bother with the comments, the best "thank > you" I can wish for is that we continue learning together ;) > Hope the following adventures of your Go journey are as interesting as > they are for me! > > Cheers &

Re: [go-nuts] Re: How to implement this in golang?

2021-07-07 Thread LetGo
where to start and how to implement your program. Otherwise I think this > will all only get you confused. > And understanding at least the important basics of Go will help you > explain your pain points here, if any remains :) > > Hope this helps, > > Le mer. 7 juil. 2021 à 12:4

Re: [go-nuts] Re: How to implement this in golang?

2021-07-07 Thread LetGo
One of these is this: ... buf := new(bytes.Buffer) foo := buf(cmd.Stdout) // this line is 87 data := foo var i int ... pkg/conn.go:87:20: cannot call non-function buf (type *bytes.Buffer) Il giorno mercoledì 7 luglio 2021 alle 12:10:03 UTC+2 LetGo ha

Re: [go-nuts] Re: How to implement this in golang?

2021-07-07 Thread LetGo
you can read > later. > > On Wednesday, 7 July 2021 at 10:07:19 UTC+1 LetGo wrote: > >> Thanks for your answer!(: >> You are right, sorry! >> This is the code: https://play.golang.org/p/zEZ2HIUNffs >> >> About the lines, wow! Yes, you got them! ahah >&

Re: [go-nuts] Re: How to implement this in golang?

2021-07-07 Thread LetGo
saying: cmd.Stdout (which you assigned to > 'data') is of type io.Writer. It's not a string; you can't take len(...) > of an io.Writer, nor can you slice it. > > On Tuesday, 6 July 2021 at 16:03:26 UTC+1 LetGo wrote: > >> I think I made some progress

Re: [go-nuts] Re: How to implement this in golang?

2021-07-06 Thread LetGo
o.Writer) for len conn.go:76:16: cannot slice data (type io.Writer) conn.go:83:22: invalid argument data (type io.Writer) for len Il giorno martedì 29 giugno 2021 alle 19:37:04 UTC+2 LetGo ha scritto: > Thank you guys for all your answers and suggestions! > I really appreciate! >

Re: [go-nuts] Re: How to implement this in golang?

2021-06-29 Thread LetGo
Jun 29, 2021 at 5:24 PM LetGo wrote: > >> Thanks for the answer! (: >> In python it was straightforward to implement and it works like a charm. >> It sends small packets with delay between each other without even care if >> it is UDP or TCP: >> >> > Be

[go-nuts] Re: How to implement this in golang?

2021-06-29 Thread LetGo
eone can help you fix > it. If you want to make it behave the same as some given python program, > then maybe you should show the python program as well. > > On Tuesday, 29 June 2021 at 11:51:57 UTC+1 LetGo wrote: > >> I forgot this: >> // Manage connection for

[go-nuts] Re: How to implement this in golang?

2021-06-29 Thread LetGo
} else { // Copy Standard I/O in a net.Conn go io.Copy(os.Stderr, conn) go io.Copy(os.Stdout, conn) io.Copy(conn, os.Stdin) } } Il giorno martedì 29 giugno 2021 alle 12:27:00 UTC+2 LetGo ha scritto: > I have a proxy written in python with some logic that I would like to > implement i

[go-nuts] How to implement this in golang?

2021-06-29 Thread LetGo
I have a proxy written in python with some logic that I would like to implement in a golang tool of mine, but I don't really know how to do it. It splits the data sent via socket (stdout) in small chunks, with a delay between each other I have a variable which gets a random number from a list: .

[go-nuts] How to make a client auto reconnect back to the server

2021-06-25 Thread LetGo
I'm trying to write a client which will be then cross-compiled for both win - linux. If for any reason appears something like a wild gandalf saying "you shall not pass" killing the connection, I need it to reconnect back to the server. So far I almost achived it. When launched for the first