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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jpg,Gif Over winsock.

Status
Not open for further replies.

JohnStep

Programmer
Apr 19, 2000
190
US
Anyone know the best way to send a Gif or Jpeg over winsock without using FTP? Is there anyway your basic IP stream?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sincerely,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John Stephens
 
JohnStep -<br><br>How complex do you want the answer to be?<br>&lt;g&gt;<br><br>If you're only dealing with Windows/Intel PCs, then you won't have to worry about translating the bytes into network order (so they can be read by Motorola/other CPUs).<br><br>Is the client a web browser?&nbsp;&nbsp;If so, then you have to delve into the mysteries of HTTP. (basically, surround the picture bytes with the correct codes to allow the user's browser to recognize it as being a picture)<br><br>Otherwise, it's just bytes.&nbsp;&nbsp;The only gotchas left is you <b>must</b> remember that in TCP/IP, it's a stream of bytes.&nbsp;&nbsp;Any concept of record length, or data length, has to be added by you.&nbsp;&nbsp;The protocol will not preserve record boundaries (this must be the #1 question on the Winsock mailing list).<br><br>Chip H.<br>
 
John,<br><br>Why bother? If you don't use ftp you will have to write both ends of the program - one to send, one to receive. You will have to implement error checking, pass the filename(s) across - all kinds of stuff that ftp handles perfectly well.<br><br>Is ftp not available at the other end? I would have thought that it TCP is available then FTP will be as well. If you have to buy it then - buy it. That will be cheaper than writing the thing yourself.<br><br>Have a look at the Internet Transfer Control that comes with VB.<br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top