- Home /
IOS socket connection to java socket server
Hi, I trawled the forums for an answer but cannot find the solution. I'm using Unity Pro (with Android and IOS Pro) and I'm trying to open a socket connection to a java socket server. On android it works perfectly as advertised, but when I deploy it to IOS, there are no socket exception, but the server does not register a new socket connection or receives any data. I have tested it with android and it works correctly. If I input an invalid IP address or port, I do get the exception. Is there something that I am missing? Here is the code I'm using to connect (as far as I understand, at that point the socket connection should be made, and should see on the server side that a connection was allocated - like when I use the android client)
IPAddress ipAddress = IPAddress.Parse("192.168.0.7"); IPEndPoint ipEndpoint = new IPEndPoint(ipAddress, 8083);
Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); clientSocket.Connect(ipEndpoint);
Any help or suggestions will be be most welcome
Your answer
![](https://koobas.hobune.stream/wayback/20220613065836im_/https://answers.unity.com/themes/thub/images/avi.jpg)