Hi, welcome to the ranch!
It helps if you can make your questions more specific. What kind of performance problem are you running into? How do you know the problem is in the socket code?
If you're just concerned about "am I using sockets wisely" or "could I do something better" feel free to post some small, focused sections of code for comment. Use the "CODE" button below the editor to preserve code formatting.