Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Why is sConnect Always Returning True?

Keywords: 	 sConnect

Question:

It seems that the sConnect() function always returns true, even when the listener app is not running. I'm pretty much just trying to implement the example in the internet extender help file right now.

Snippet:

   SOCKET = 30999
   channel = sOpen()
   ret = sConnect(channel, "SERVER", SOCKET)
ret is == TRUE no matter whether listener on SOCKET is there or not... I then do
   if ret ...
   sSendLine(channel, sometext)
and this gets executed no matter what. Any thoughts much appreciated.

Answer:

Perhaps after doing the sConnect, use the wxInfo functions to get more details of the connection. See what - if anything - it thinks it connected to. You can get the ipaddress and the remote port out of the Sockets functions.
Article ID:   W12668
Filename:   sConnect Always Returning True.txt