winsock control

davecarr2000
09-07-2001, 02:50 PM
Can somebody look at this code and tell where im going wrong.
If find that the first client to connect can send data, but doesn't receive it. The second client can send and receive.
newSck is an index control for the winsock.

For y = 1 To newSck
If sckServer(y).State = sckConnected Then
sckServer(y).GetData strData
If strData <> "" Then
For x = 1 To newSck
If sckServer(x).State = sckConnected Then
sckServer(x).SendData strData
End If
Next x
End If
End If
Next y

Banjo
09-14-2001, 04:20 AM
I'm not sure what you're trying to accomplish. Could you give some more info?

ChiefRedBull
09-15-2001, 05:04 AM
Yeh that code in itself should work fine Dave. I cant see any obvious problems. It looks like you have an array of Socks, and when they receive data, they send it straight back right?
So one end is working and the others not.... hmm..... It sounds like its something to do with connections n stuff.
Could you post a little more code?

Chief

"Dammit Smithers, this is brain surgery not rocket science!! Now hand me that ice cream scoop..."

hashir56
09-15-2001, 02:13 PM
i think the reason why the first client doesnt recive data is because you have to wait for the Winsock1_DataArrival() sub to trigger..

ChiefRedBull
09-16-2001, 04:47 AM
Am i right in assuming that the code you supplied is from your DataArrival Sub dave?

Chief

"Dammit Smithers, this is brain surgery not rocket science!! Now hand me that ice cream scoop..."

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum