if you /sockwrite to client.* that means client.* will send data. This will then be received by connect, but since there is no ON SOCKREAD:connect: mIRC discards the data.
Some small things btw:
-you don't need the -t switch for sockwrite if the text you send doesn't start with an ampersand (doesn't do any harm though)
-If you make the name of the accepting socket (client.*) dependant on only the ip of the connection, there could be problems: if someone connects to you twice the ip will be the same, so there will be an error because that socket already exists. To prevent this you could include the remote port in the sockname as well, or use another way of picking a unique name (like using $ticks).