WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

s... Socket Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 1999:04:15:16:48:48
Last Updated: 1999:04:15:16:48:48