connections.send(s, "getwork", 10)

I searched a little bit more and here is in Python send() function

def send(sdef, data, slen): 
    sdef.setblocking(0) 

    sdef.sendall(str(len(str(json.dumps(data)))).encode("utf-8"
).zfill(slen)) 
    sdef.sendall(str(json.dumps(data)).encode("utf-8"))

Unfortunately, I don't know Python. the challenge is to rewrite the send 
function 
in Go.




-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to