Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WinSock waiting question?

Status
Not open for further replies.

tommy19

Programmer
Aug 23, 2001
49
US
Howdy,
I am wondering if the is a way, when you read the incoming data from a winsock connection, to automatically use the senddata function, when a particular string is present. ie, I want my program to automatically loginto a unix box via winsock, If I senddata, immediately, then the connection is too quick and doesn't recieve the send, Can I trigger off the incoming string? And how would I do that?
Thanks in advance!! ;p

Tommy19
 
You can use a timer to delay your response for a half-second or so. This might give your Unix box time to respond. You can find the timer in the toolbox -- just drop it on a form. Set the Interval to 500 (500 milliseconds is .5 seconds). Max value is 32767 (32.767 seconds). When the timer expires it raises it's Timer event. In that event you should turn the Enabled property off so the timer only fires once.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top