login about faq

Hi my project connects a client (Objective-C) to a server (C++), and it was working fine, but suddenly, i got "network is unreachable" Error. I've been struggling with this for a while, and i cant find a solution!!!

The code is as follows:

NSString *sslServerHost; sslServerHost = @"192.168.100.7"; int sslServerPort; sslServerPort = 8000;

//  Connect to the SSL server:
success = [socket Connect:sslServerHost
           port: [NSNumber numberWithInt: sslServerPort]
           ssl: ssl
           maxWaitMs:[NSNumber numberWithInt: maxWaitMillisec] ];

if (success != YES) {
    NSLog(@"%@",socket.LastErrorText);
    return;
}

//  Set maximum timeouts for reading an writing (in millisec)
socket.MaxReadIdleMs = [NSNumber numberWithInt:10000];
socket.MaxSendIdleMs = [NSNumber numberWithInt:10000];

//  Send a "Hello Server! -EOM-" message:
success = [socket SendString: @"Hello Server! -EOM-"];
if (success != YES) {
    NSLog(@"%@",socket.LastErrorText);
    return;
}

//  The server (in this example) is going to send a "Hello Client! -EOM-"
//  message.  Read it:
NSString *receivedMsg;
receivedMsg = [socket ReceiveUntilMatch: @"-EOM-"];
if (receivedMsg == nil ) {
    NSLog(@"%@",socket.LastErrorText);
    return;
}
 NSLog(@"%@",receivedMsg);

THIS IS THE ERROR I'M GETTING:

Connect_Socket: DllDate: Jan 22 2015 ChilkatVersion: 9.5.0.47 UnlockPrefix: RANIAASocket Architecture: Little Endian; 64-bit Language: IOS Objective-C VerboseLogging: 0 objectId: 1 Connect_Socket: hostname: 192.168.100.7 port: 8000 ssl: 1 maxWaitMs: 200000 socket2Connect: connect2: connectImplicitSsl: connectSocket: connect_ipv6_or_ipv4: socketErrno: 51 socketError: Network is unreachable --connect_ipv6_or_ipv4 --connectSocket --connectImplicitSsl ConnectFailReason: Connection rejected --connect2 --socket2Connect Failed. --Connect_Socket --Connect_Socket --ChilkatLog

Can someone please help me! I neeeeed help

Regards.

asked Aug 26 '15 at 00:43

rania's gravatar image

rania
45182228

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×34
×26

Asked: Aug 26 '15 at 00:43

Seen: 600 times

Last updated: Aug 26 '15 at 00:43

powered by OSQA