Winsock Help Needed 
Author Message
 Winsock Help Needed

Pulling my hair out for a week.

Using the Catalyst SocketWrench control.
Set all the local and host addresses, ports, protocols, socket types,......
Heavy error checking in each event, after each method and no errors are
occuring.

Problem is, I cannot get receiving computer to respond.  It is in listen
mode, no errors, and when I try to connect with it, it doesn't even see that
I'm trying to connect.

So, anybody want to send me any examples of theirs?
I'm using VB4 Enterprise.

Tony



Thu, 22 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
Hi Code Monkey,

This might not be the answer you were waiting for, but anyway ...

I tried using it (SocketWrench) a while ago, and it worked, but found that
it takes *some* time to initialise.
I wrote a Server app with 16 client windows, each of them having it's own
control, and starting the app took about 30 seconds.
I them replaced the SocketWrench controls with the MS WinSock control, and
starting the app then took about 1.5 seconds, so I don't think I will ever
use the SocketWrench control again.
I you are looking for any (usefull) alternatives to the WinSock, you could
try the XMComm control (Richard Grier).
You can find it at
http://ourworld.compuserve.com/homepages/richard_grier.

Hope this helps ...

Rene Whitworth
Whitworth Software Solutions - Germany
http://www.geocities.com/SiliconValley/8928 (under construction)

Please reply to the newsgroup :-)


Quote:
>Pulling my hair out for a week.

>Using the Catalyst SocketWrench control.
>Set all the local and host addresses, ports, protocols, socket types,......
>Heavy error checking in each event, after each method and no errors are
>occuring.

>Problem is, I cannot get receiving computer to respond.  It is in listen
>mode, no errors, and when I try to connect with it, it doesn't even see
that
>I'm trying to connect.

>So, anybody want to send me any examples of theirs?
>I'm using VB4 Enterprise.

>Tony




Fri, 23 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
I had a similar problem. No errors when connecting, but 'not connected'
when trying to send data. Using the Winsock control now with good
results.


Quote:
> Pulling my hair out for a week.

> Using the Catalyst SocketWrench control.
> Set all the local and host addresses, ports, protocols, socket types,......
> Heavy error checking in each event, after each method and no errors are
> occuring.

> Problem is, I cannot get receiving computer to respond.  It is in listen
> mode, no errors, and when I try to connect with it, it doesn't even see that
> I'm trying to connect.

> So, anybody want to send me any examples of theirs?
> I'm using VB4 Enterprise.

> Tony


--
Regards,
John



Fri, 23 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
Where can I get the MS Winsock control?  It isn't showing up as a custom
control in VB4.

And, if you have some sample code to send.......

Thanks
Code Monkey

Quote:

>Hi Code Monkey,

>This might not be the answer you were waiting for, but anyway ...

>I tried using it (SocketWrench) a while ago, and it worked, but found that
>it takes *some* time to initialise.
>I wrote a Server app with 16 client windows, each of them having it's own
>control, and starting the app took about 30 seconds.
>I them replaced the SocketWrench controls with the MS WinSock control, and
>starting the app then took about 1.5 seconds, so I don't think I will ever
>use the SocketWrench control again.
>I you are looking for any (usefull) alternatives to the WinSock, you could
>try the XMComm control (Richard Grier).
>You can find it at
>http://ourworld.compuserve.com/homepages/richard_grier.

>Hope this helps ...

>Rene Whitworth
>Whitworth Software Solutions - Germany
>http://www.geocities.com/SiliconValley/8928 (under construction)

>Please reply to the newsgroup :-)


>>Pulling my hair out for a week.

>>Using the Catalyst SocketWrench control.
>>Set all the local and host addresses, ports, protocols, socket
types,......
>>Heavy error checking in each event, after each method and no errors are
>>occuring.

>>Problem is, I cannot get receiving computer to respond.  It is in listen
>>mode, no errors, and when I try to connect with it, it doesn't even see
>that
>>I'm trying to connect.

>>So, anybody want to send me any examples of theirs?
>>I'm using VB4 Enterprise.

>>Tony




Fri, 23 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
Hi,

The control is available in VB Enterprise ( VB5 and VB6 ) (and probably in
Professional packaging too). I don't know about VB4.

The example coming with the product (the book or on MSDN CD) is a nice
introduction on how to use the control.

If you are using them in VBA and under WIndows 9x, be aware:

    When sending data, use:
        Me!MySocket.SendData CStr( MyString)

not:    Me!MySocket.SendData MyString

The latter will work for the socket having establish the connection, but the
control having Accept the RequestID will send garbage if you don't use CStr
( Unicode interferences?).

Also, use IP addresses, not friendly name (too slow, if working at all).

And finally, if sending the same message through many sockets, use a
DoEvents between the sending:

    For i = 1 to nMax
        MyVectorOfWinsockControl(i).SendData Cstr(myString)
        DoEvents
    Next i

If not, the messages have the tendency to be kept locally in the buffer.

I have a small database example using a Speaker (client) Form and a Listener
(server) Form, where the Listener can accept up to eight winsock connections
with multiearing and broadcasting abilities, but in Access (a Speaker makes
a change in a table, "signal" it to the Listener which broadcast the signal
to all the other connected speakers, a little bit like a NetDDE "warm" link,
if you prefer). If you are interested, ring a bell.

Hope it may help,
Vanderghast, Access MVP.

Quote:

>Where can I get the MS Winsock control?  It isn't showing up as a custom
>control in VB4.

>And, if you have some sample code to send.......

>Thanks
>Code Monkey


>>Hi Code Monkey,

>>This might not be the answer you were waiting for, but anyway ...

>>I tried using it (SocketWrench) a while ago, and it worked, but found that
>>it takes *some* time to initialise.
>>I wrote a Server app with 16 client windows, each of them having it's own
>>control, and starting the app took about 30 seconds.
>>I them replaced the SocketWrench controls with the MS WinSock control, and
>>starting the app then took about 1.5 seconds, so I don't think I will ever
>>use the SocketWrench control again.
>>I you are looking for any (usefull) alternatives to the WinSock, you could
>>try the XMComm control (Richard Grier).
>>You can find it at
>>http://ourworld.compuserve.com/homepages/richard_grier.

>>Hope this helps ...

>>Rene Whitworth
>>Whitworth Software Solutions - Germany
>>http://www.geocities.com/SiliconValley/8928 (under construction)

>>Please reply to the newsgroup :-)


>>>Pulling my hair out for a week.

>>>Using the Catalyst SocketWrench control.
>>>Set all the local and host addresses, ports, protocols, socket
>types,......
>>>Heavy error checking in each event, after each method and no errors are
>>>occuring.

>>>Problem is, I cannot get receiving computer to respond.  It is in listen
>>>mode, no errors, and when I try to connect with it, it doesn't even see
>>that
>>>I'm trying to connect.

>>>So, anybody want to send me any examples of theirs?
>>>I'm using VB4 Enterprise.

>>>Tony




Sat, 24 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
Hi,

....... and you can check also the book "Microsoft Visual Basic 5.0
Reference Library", at MS Press, but use the "signature" as provided from
the top-right combo box in VBA-module code environment form, the signature
based on the cited book won't work for most events (at least, not from
Access).

Vanderghast, Access MVP.

Quote:

>Hi,

>The control is available in VB Enterprise ( VB5 and VB6 ) (and probably in
>Professional packaging too). I don't know about VB4.

>The example coming with the product (the book or on MSDN CD) is a nice
>introduction on how to use the control.

>If you are using them in VBA and under WIndows 9x, be aware:

>    When sending data, use:
>        Me!MySocket.SendData CStr( MyString)

>not:    Me!MySocket.SendData MyString

>The latter will work for the socket having establish the connection, but
the
>control having Accept the RequestID will send garbage if you don't use CStr
>( Unicode interferences?).

>Also, use IP addresses, not friendly name (too slow, if working at all).

>And finally, if sending the same message through many sockets, use a
>DoEvents between the sending:

>    For i = 1 to nMax
>        MyVectorOfWinsockControl(i).SendData Cstr(myString)
>        DoEvents
>    Next i

>If not, the messages have the tendency to be kept locally in the buffer.

>I have a small database example using a Speaker (client) Form and a
Listener
>(server) Form, where the Listener can accept up to eight winsock
connections
>with multiearing and broadcasting abilities, but in Access (a Speaker makes
>a change in a table, "signal" it to the Listener which broadcast the signal
>to all the other connected speakers, a little bit like a NetDDE "warm"
link,
>if you prefer). If you are interested, ring a bell.

>Hope it may help,
>Vanderghast, Access MVP.


>>Where can I get the MS Winsock control?  It isn't showing up as a custom
>>control in VB4.

>>And, if you have some sample code to send.......

>>Thanks
>>Code Monkey


>>>Hi Code Monkey,

>>>This might not be the answer you were waiting for, but anyway ...

>>>I tried using it (SocketWrench) a while ago, and it worked, but found
that
>>>it takes *some* time to initialise.
>>>I wrote a Server app with 16 client windows, each of them having it's own
>>>control, and starting the app took about 30 seconds.
>>>I them replaced the SocketWrench controls with the MS WinSock control,
and
>>>starting the app then took about 1.5 seconds, so I don't think I will
ever
>>>use the SocketWrench control again.
>>>I you are looking for any (usefull) alternatives to the WinSock, you
could
>>>try the XMComm control (Richard Grier).
>>>You can find it at
>>>http://ourworld.compuserve.com/homepages/richard_grier.

>>>Hope this helps ...

>>>Rene Whitworth
>>>Whitworth Software Solutions - Germany
>>>http://www.geocities.com/SiliconValley/8928 (under construction)

>>>Please reply to the newsgroup :-)


>>>>Pulling my hair out for a week.

>>>>Using the Catalyst SocketWrench control.
>>>>Set all the local and host addresses, ports, protocols, socket
>>types,......
>>>>Heavy error checking in each event, after each method and no errors are
>>>>occuring.

>>>>Problem is, I cannot get receiving computer to respond.  It is in listen
>>>>mode, no errors, and when I try to connect with it, it doesn't even see
>>>that
>>>>I'm trying to connect.

>>>>So, anybody want to send me any examples of theirs?
>>>>I'm using VB4 Enterprise.

>>>>Tony




Sat, 24 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
Hi Michel,

Michel Walsh schrieb in Nachricht ...

Quote:
>Hi,

>The control is available in VB Enterprise ( VB5 and VB6 ) (and probably in
>Professional packaging too). I don't know about VB4.

It IS available in the Pro edition of VB5, and AFAIK, also in VB4 (Pro/Ent)

Quote:

>The example coming with the product (the book or on MSDN CD) is a nice
>introduction on how to use the control.

I only used the example in the VB helpfile to learn how to use it :-)

Quote:

>If you are using them in VBA and under WIndows 9x, be aware:

>    When sending data, use:
>        Me!MySocket.SendData CStr( MyString)

>not:    Me!MySocket.SendData MyString

>The latter will work for the socket having establish the connection, but
the
>control having Accept the RequestID will send garbage if you don't use CStr
>( Unicode interferences?).

Never had this problem in VB :-)

Quote:

>Also, use IP addresses, not friendly name (too slow, if working at all).

It definately works in VB, and it isn't slow at all.

Quote:

>And finally, if sending the same message through many sockets, use a
>DoEvents between the sending:

>    For i = 1 to nMax
>        MyVectorOfWinsockControl(i).SendData Cstr(myString)
>        DoEvents
>    Next i

>If not, the messages have the tendency to be kept locally in the buffer.

Never tried this, but it's hard to believe.
On the other hand, if you want to send commands (like I did) over the SAME
connection, you should give the receiving app time to handle it (when data
comes to fast, it will be handled as just one string).

Quote:

>I have a small database example using a Speaker (client) Form and a
Listener
>(server) Form, where the Listener can accept up to eight winsock
connections
>with multiearing and broadcasting abilities, but in Access (a Speaker makes
>a change in a table, "signal" it to the Listener which broadcast the signal
>to all the other connected speakers, a little bit like a NetDDE "warm"
link,
>if you prefer). If you are interested, ring a bell.

My app (server) manages security for up to 16 clients by sending commands to
lock/unlock the entire terminal.
It also sends some informational strings (remaining time) to inform the user
of the terminal, and it receives commands (mostly requests) from the client.
The server app is a MDI form with a child form (with WinSock control) for
each client.
I won't give away this code, but if you're interested, I could extract some
example code from it :-)

Quote:

>Hope it may help,
>Vanderghast, Access MVP.

[...]

Hope this helps ...

Rene Whitworth
Whitworth Software Solutions - Germany
http://www.geocities.com/SiliconValley/8928 (under construction)

Please reply to the newsgroup :-)



Sun, 25 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
I have posted a sample usage of the Winsock control on our company web site.
The server example uses an array of controls to handle incoming messages.

http://mstech.born.com/tiptrick.htm#vb

------------------------------------------------------
Dan Zemmels
BORN Information Services, Inc.
www.born.com      mstech.born.com

Quote:

>And, if you have some sample code to send.......



Sun, 25 Mar 2001 03:00:00 GMT  
 Winsock Help Needed


Quote:
>Using the Catalyst SocketWrench control.
>Set all the local and host addresses, ports, protocols, socket types,......
>Heavy error checking in each event, after each method and no errors are
>occuring.

>Problem is, I cannot get receiving computer to respond.  It is in listen
>mode, no errors, and when I try to connect with it, it doesn't even see that
>I'm trying to connect.

I would need to see some of the code that you've written to be able to
provide specific answers. However, a couple of points:

If you're developing a server application, I strongly recommend that
you put the control in non-blocking mode (Blocking is False) and that
you disable the reverse DNS lookup of host addresses (AutoResolve to
False). More than likely, this was the delay that the other poster
here mentioned; especially under NT, asking the control to
automatically resolve hostnames/IP addresses can result in a noticable
delay. Disabling this property in the control can speed things up,
significantly (this is discussed in our FAQ, by the way).

On the client end, since another poster mentioned this, if you're
attempting to connect using a non-blocking socket, you cannot simply
issue the Connect method and then being reading and writing --
otherwise you'll get errors that no connection has been established.
You need to wait until the Connect event fires, signalling that the
connection has been completed. We have a couple of samples, SWTCP and
SWECHO, which demonstrate this.

If you have technical questions about SocketWrench, you can fill out
the support request form on our website (www.catalyst.com) or send

SocketWrench is freeware, we have and will continue to support the
package along with our commercial products.

-Mike

----

Catalyst Development Corporation          Web:   http://www.catalyst.com



Sun, 25 Mar 2001 03:00:00 GMT  
 Winsock Help Needed
This has solved my problem with SocketWrench. I was hesitant to ask for
support for a free product :)

I'm trying to write my own protocols to get a better understanding of
them, but I'll probably succumb to a commercial product eventually.

Bearing this in mind, are there any distinct advantages in using
SocketWrench over MS Winsock 6 at this stage?


[snippet...]

Quote:
> On the client end, since another poster mentioned this, if you're
> attempting to connect using a non-blocking socket, you cannot simply
> issue the Connect method and then being reading and writing --
> otherwise you'll get errors that no connection has been established.
> You need to wait until the Connect event fires, signalling that the
> connection has been completed. We have a couple of samples, SWTCP and
> SWECHO, which demonstrate this.

> If you have technical questions about SocketWrench, you can fill out
> the support request form on our website (www.catalyst.com) or send

> SocketWrench is freeware, we have and will continue to support the
> package along with our commercial products.

> -Mike

> ----

> Catalyst Development Corporation          Web:   http://www.catalyst.com

--
Regards,
John



Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. WinSock Help needed

2. WinSock HELP - need reverse DNS lookup ...

3. Winsock help needed!

4. Winsock help needed

5. !Commandline Email via Winsock Help Needed!

6. WinSock Help Needed

7. Winsock Help Needed Desperately

8. WinSock HELP - need reverse DNS lookup ...

9. Winsock Help Needed

10. Winsock help needed

11. Need help with winsock PLEASE.......

12. Visual Basic 4 Socket communication (WinSock) Need Help!

 

 
Powered by phpBB® Forum Software