|
-
Mar 4th, 2002, 01:46 AM
#1
Thread Starter
Junior Member
any Flush function in VB????
hi,
I am sending a message thro winsock(send data method)after sending that i need to flush or empty the buffer........im trying to connect java client and vb server thro socket connection.....after connecting im sending a message from server(written in vb)..
wskserver.senddata ("connected");
this is should get in java client...but im not getting this response.... after closing the server i get connected in the java client...y is this so...y i get the "connected" message after closing the VB server.....???
i have got a suggestion saying
"if you close the socket is that the O/S is flushing the buffers before handling all the termination...........but look for a flush() function call
on the socket or stream and call that"
I want to know that any fulsh function is there in VB......to solve my problem...please help me.....
Thanks in advance..
Padma.
-
Mar 4th, 2002, 02:03 AM
#2
Try put the SendData method in the Connect event rather than straight after invoking Connect. You might also want to try to keep an eye on the SendComplete event, so you know when the "connected" message has been sent out.
There is no Flush method for winsock.
Also, if you are stepping through the program rather than executing it, that could cause some problems.
-
Mar 4th, 2002, 02:50 AM
#3
Addicted Member
its right ... there is no such flush function in VB .. socket gets empty as soon as data goes fm it .. check out all necessary events has sunnyl wrote .. u can put debug.priny to ur data string i..e "connected" in required events . u will come to know whether u string has been passed out or not .. i could tell u more if both client and server both would be on VB .. not clear abt java how u r handling it at client end ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|