Hi there,
Unfortunately, we are GUI experts, and none of us are very familiar with TCP/IP socket communication via WLAN.
Therefore, I don't think this is the best place to ask that question.
You might find someone who can help you with your project in a more general Raspberry Pi forum.
Best regards,
Tim