Results 1 to 3 of 3

Thread: any Flush function in VB????

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    18

    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.

  2. #2
    sunnyl
    Guest
    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.

  3. #3
    Addicted Member chander's Avatar
    Join Date
    Nov 2000
    Location
    New Delhi , India
    Posts
    225
    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 ...
    Chander
    Email:[email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width