execution order?

This is a guess, but the image wont be drawn until the next frame, which wont be done until after the function finishes. Use a one time do later task for myClient.connect() so the image can be drawn.