Results 1 to 2 of 2

Thread: receiving multiple strings with getdata

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    1

    receiving multiple strings with getdata

    hey all

    im having a lil problem. how can i use winsock, and send multiple peices of data, and receive multiple peices of data, and in the end be able to match them up? im using a clint/server.
    i can single senddata and receive it, but cant send mulitple peices and receive it. like so

    Code:
    data1 = Text2.Text
    data2 = Text4.Text
    data3 = Text3.Text
    data4 = Text1.Text
    Form1.Winsock1.SendData "box"
    DoEvents
    Form1.Winsock1.SendData data1
    DoEvents
    Form1.Winsock1.SendData data2
    DoEvents
    Form1.Winsock1.SendData data3
    DoEvents
    Form1.Winsock1.SendData data4
    
    
    and ion the server...
    
    Winsock1.GetData data1
    
    DoEvents
    Winsock1.GetData data2
    DoEvents
    Winsock1.GetData data3
    DoEvents
    Winsock1.GetData data4
    DoEvents
    Winsock1.GetData data5
    DoEvents
    Winsock1.GetData data6
    DoEvents
    rdata1 = data1
    rdata2 = data2
    rdata3 = data3
    rdata4 = data4
    rdata5 = data5
    the doevents doesnt work, and i tried the & sign, and & sign...
    any ideas?
    thx
    Booooze

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    well

    You could mark your data differently, thereby making in recognisable - so in your WS_DataArrival, you just need one GetData and a little string parsing function to determine what data was sent - get it ?

    Cheers!
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

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