This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type bot_instance struct { | |
running bool | |
deaded bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net" | |
import "io" | |
import "encoding/binary" | |
import "fmt" | |
func handleConnection(conn net.Conn) { | |
defer conn.Close() | |
p := make([]byte, 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(args: List[String]): URIO[Random with Console with Console,ExitCode] = { | |
HttpClientZioBackend().flatMap { backend => | |
for { | |
_ <- random.nextIntBetween(0, urist.length - 1).flatMap( i => quickRequest.get(urist(i)).send(backend)).catchAll(e => putStrLn(e.getMessage())).forever.fork | |
r <- r.join | |
_ <- backend.close() | |
} yield () | |
}.exitCode | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(args: List[String]): URIO[Random with Console with Console,ExitCode] = { | |
HttpClientZioBackend().flatMap { backend => | |
for { | |
r <- random.nextIntBetween(0, urist.length - 1).flatMap( i => quickRequest.get(urist(i)).send(backend)).catchAll(e => putStrLn(e.getMessage())).forever.fork | |
_ <- r.join | |
_ <- backend.close() | |
} yield () | |
}.exitCode | |
} |