sending data via winsock control 
Author Message
 sending data via winsock control

Hi
How i can send image picture from the server to thr client
via winsock cotrol .
i tried to send it by using
      winsock1.senddata image1.picture

on the client application i have the following source

          dim indata as image
          winsock2.getdata image1.picture
But for some reason the client Application do not like it
Pls your help



Sat, 01 Jul 2000 03:00:00 GMT  
 sending data via winsock control

I would do it like this:
the pic is in a file
open the file
read the file and send it in packets using vbstring

sub StartUpload()
timer1.interval=100
timer1.enabled=true
end sub
'#############################
sub timer1()
timer1.enabled=false
dim tmpstring as string
static opened as boolean
static ff as integer
static eoffound as booelan
if not opened then
  ff=freefile
  open "mypic.jpg or whatever" for binary as ff
  opened=true
end if
if eoffound=true then 'close the dataconnection
  close ff
  opened=false
  eoffound=false
   winsock1.close
   winsock1.localport=0
  exit sub
end if

tmpstring=input(ff,8000) 'eiiiihhhh, magicnumber:(
if eof(ff) then
   eoffound=true
end if
winsock1.senddata tmpstring
end sub
'#############################
sub winsock1_sendcomplete()
  timer1.interval=100
   timer1.enabled=true
end sub

Quote:

>Hi
>How i can send image picture from the server to thr client
>via winsock cotrol .
>i tried to send it by using
>      winsock1.senddata image1.picture

>on the client application i have the following source

>          dim indata as image
>          winsock2.getdata image1.picture
>But for some reason the client Application do not like it
>Pls your help



Sun, 02 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Sending binary data via winsock control in VB5

2. Sending binary data via winsock control in VB5

3. Loading Data into MultiDim Array/Sending via WinSock

4. Winsock Control sending data to Last control in array

5. Send File via Winsock Control

6. Sending Variables Via the Winsock Control

7. Sending a message via Winsock control

8. Sending a message via Winsock control

9. sending info via IP without the winsock control

10. Sending Hex Data Via UDP Control

11. Winsock Control sending binary data

12. Cannot send/receive binary data using Winsock Control...

 

 
Powered by phpBB® Forum Software