Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
RadKesvat committed Dec 22, 2023
1 parent 853a0d4 commit d060708
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/foreign_server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,18 @@ proc poolController() {.async.} =

await conn.twriter.write(generateFinishHandShakeData(upload))

await sleepAsync(3500)

if upload:
context.up_bounds.add conn
asyncSpawn handleUpClient(conn)
else:
context.dw_bounds.add conn
asyncSpawn processConnection(conn)

await sleepAsync(3000)
if upload:
block initialWriteToOpenBandWidth:
for i in 0..10:
for i in 0..40:
var len = 3000+rand(globals.random_str.len() - 3000)
let random_start = rand(1500)
let full_len = min((len+random_start), globals.random_str.len() - random_start)
Expand All @@ -340,12 +348,6 @@ proc poolController() {.async.} =
data.flagForSend(flag)
await conn.twriter.write(data)

if upload:
context.up_bounds.add conn
asyncSpawn handleUpClient(conn)
else:
context.dw_bounds.add conn
asyncSpawn processConnection(conn)

else:
if globals.log_conn_create: echo "Connecting to iran Timed-out!"
Expand Down

0 comments on commit d060708

Please sign in to comment.