login about faq

We use iOS chilkat socket library for iOS project. We use c++ api for our needs. We have an issue with "Connect" (without ssl) method. It always return true. Even if server is not running. (BTW on windows project it works as expected.) When we try to read something from this socket (on iOS side) with the usage of method "ReceiveBytesN" it returns false. get_IsConnected() function returns false and last error is:

ChilkatLog:
  IsConnected:
    DllDate: Sep 19 2012
    UnlockPrefix: **
    Username: ***
    Architecture: Little Endian; 32-bit
    Language: IOS Objective-C
    VerboseLogging: 0
    fd: 0x6
    objectId: 1
  --IsConnected
--ChilkatLog
Did anyone have such problem?

asked Feb 22 '13 at 12:05

vol_ya's gravatar image

vol_ya
1334

edited Feb 25 '13 at 06:49

It may not solve the problem, but the first thing I recommend is retrying your code with the latest DLL builds (9.4.0, Dec 2012).

(Feb 22 '13 at 13:24) jpbro ♦

Also, examine the LastErrorText after calling Connect. You can also use verbose logging by setting the VerboseLogging property = true. The LastErrorText contains information regardless of the success/failure return of the method -- which is helpful in cases where a method returns success, but somehow didn't behave as expected.

(Feb 22 '13 at 17:09) chilkat ♦♦

I used the lates version of library (9.4.0). Result is the same. I'll try to use VerboseLogging and and LastErrorText after connect. Then I'll give an update here.

link

answered Feb 25 '13 at 03:35

vol_ya's gravatar image

vol_ya
1334

edited Feb 25 '13 at 04:22

Computer with destination IP is powered off.

Here is updated log from LastErrorText after calling function Connect:

ChilkatLog:
  Connect_Socket:
    DllDate: Dec 21 2012
    UnlockPrefix: *
    Username: *
    Architecture: Little Endian; 32-bit
    Language: IOS Objective-C
    VerboseLogging: 1
    objectId: 1
    hostname: *
    port: *
    ssl: 0
    maxWaitMs: 20000
    ConnectTimeoutMs_1: 20000
    calling ConnectSocket2
    IPV6 enabled connect with NO heartbeat.
    This is an IPV4 numeric address...
    AddrInfoList:
      AddrInfo:
        ai_flags: 0
        ai_family: 2
        ai_socktype: 1
        ai_protocol: 6
        ai_addrlen: 16
        ai_canonname: (NULL)
      --AddrInfo
    --AddrInfoList
    Connect using IPV4.
    ipAddress1: *
    Info: Socket operation in progress..
    myIP_3: *
    myPort_3: *
    connect successful (2)
    socketOptions:
      SO_SNDBUF: 131072
      SO_RCVBUF: 131072
      TCP_NODELAY: 0
    --socketOptions
    Success.
  --Connect_Socket
--ChilkatLog
link

answered Feb 25 '13 at 06:45

vol_ya's gravatar image

vol_ya
1334

Any updates?

link

answered Feb 26 '13 at 04:26

vol_ya's gravatar image

vol_ya
1334

The information in the LastErrorText shows that the connect system call succeeded. (see http://linux.die.net/man/2/connect ) I don't have any other answer.

link

answered Feb 26 '13 at 14:16

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Found out some new information. When computer, where Server is installed, is off socket's function "connect" works as expected. (after timeout returns false)

link

answered Mar 18 '13 at 12:30

vol_ya's gravatar image

vol_ya
1334

Your answer
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:

×15

Asked: Feb 22 '13 at 12:05

Seen: 1,838 times

Last updated: Mar 18 '13 at 12:30

powered by OSQA