- This topic has 3 replies, 2 voices, and was last updated 10 years, 8 months ago by Anonymous.
-
AuthorPosts
-
March 21, 2014 at 07:01 #2385AnonymousInactive
Hi NetworkCommsDotNet,
– I am developing on IOS with Xamarin. I used NetworkCommsDotNet to connect my server. But it throw:
Timeout waiting for server connnectionInfo from [TCP] 127.0.0.1:49585 -> 127.0.0.1:8888. Connection created at 13:49:20.140, its now 13:49:30.2– And my server log: MINA Input – sessionCreated on Thread: 19
– I do not understand why my server can create session, but in client it throw time out exception. Here is my code:
public void Connect (string ip, int port) { Debug.WriteLine (TAG + " - Connect to ip: " + ip + " and port: " + port); this.IP = ip; this.Port = port; ConnectionInfo serverConnectionInfo = null; try { Debug.WriteLine (TAG + " - Initing Connection Info"); serverConnectionInfo = new ConnectionInfo(this.IP, this.Port); Debug.WriteLine (TAG + " - Inited Connection Info"); } catch (Exception) { Debug.WriteLine (TAG + " - Failed to parse the server IP and port. Please ensure it is correct and try again."); return; } //We perform the send within a try catch to ensure the application continues to run if there is a problem. try { TCPConnection.GetConnection(serverConnectionInfo, true); } catch (CommsException e) { Debug.WriteLine (TAG + " - " + e.Message); if (MessageHandler != null) { MessageHandler.OnConnectionFail (); } return; } catch (Exception) { Debug.WriteLine(TAG + " - Error: A general error occured while trying to send message to " + serverConnectionInfo + ". Please check settings and try again."); } Debug.WriteLine (TAG + " - Connected to ip: " + ip + " and port: " + port); if (Session != null && MessageHandler != null) { MessageHandler.OnConnected (); } }
Please, give me some idea about that. Thanks.
Truong PS.March 21, 2014 at 15:12 #2387AnonymousInactiveHeya truongps,
Many kind thanks for your interest in our network library and welcome to our forums. What version of the library are you using?
“127.0.0.1” is a loopback address and can only be used if your client and server are on the same machine. Please try connecting to your server using a different IP address.
Regards,
MarcMarch 22, 2014 at 15:11 #2390AnonymousInactiveHi MarcF,
– I get NetworkCommsDotNet from Xamarin Component Store.
– I run my server on local, my client and server are on the same machine. So the server ip is: 127.0.0.1. And it throw this. My server based on Apache Mina.Thanks for your attention,
TruongPSMarch 25, 2014 at 01:43 #2394AnonymousInactiveHeya TruongPS,
The version of NetworkComms.Net on the xamarin component store is 2.3.0, which is over a year old. Could you please test using version 3.0.0 to see if you still have this problem?
Regards,
Marc -
AuthorPosts
- You must be logged in to reply to this topic.