login about faq

I tried posting this question a few days ago but it hasn't appeared, I think because I hadn't confirmed my email.
I have to change an old vb6 program to use https rather than http for uploading files to a server. I know very little about this process or about Chilkat socket so please excuse if these are obvious questions. The program currently uses a Winsock.
Two questions: 1. The program sends a series of http headers then a text file (typically about 200 lines) then the server responds with a short acknowledge message. Does anything about this change with a Chilkat socket or because of https? Basically, do I just Connect, sendline, sendline, etc then I get back a response? 2. Sometimes (infrequently but randomly) the server will send back a file as part of its' acknowledgment so its' usual 100 byte response will change to about a 15k reply. Note that this response is normally split by the tcp/ip on the server into an arbitrary number of blocks so the Winsock version has to wait for perhaps dozens of individual blocks to arrive. How do I receive these with a Chilkat socket?

Thanks for your help Ian

asked Apr 07 at 18:26

ianb's gravatar image

ianb
11


Hi Ian,

If you're intending to go down the path of communicating with an HTTP server via the Socket API (as opposed to the HTTP or REST API), then what you're really doing is attempting to implement the HTTP protocol. There's no simple answer for your question. My recommendation would be to buy this book: HTTP: The Definitive Guide, study it, and then allocate a number of months to implement the protocol, and even then it wouldn't be a solid implementation because I can tell you from experience that HTTP is far more involved than it would appear.

(Or you could just use a library that already implements the HTTP protocol, such as Chilkat's HTTP or REST API.)

link

answered Apr 10 at 15:09

chilkat's gravatar image

chilkat ♦♦
12.8k317366477

Thank you for that reply. I will surely look at your http product.

link

answered Apr 11 at 11:14

ianb's gravatar image

ianb
11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×81

Asked: Apr 07 at 18:26

Seen: 1,996 times

Last updated: Apr 11 at 11:14

powered by OSQA