Send/return html with Socket server

Experimenting a bit with sockets.

After the client has connected to the server through the browser, the server will respond/send html to the client.

The following response string actually works if the client makes a reqeust to the server from chrome, it displays the string as html in the browser. But it does not work with IE.

char message[65] = "HTTP/1.1 200 \r\n\r\n <html><body><h1>Hello buddy</h1></body></html>" ;

Any suggestions?

It’s solved now.This may help someone else in the future as well…

I had to add “shutdown()” after “send()”. I suppose IE does not show any content at all until you have stopped sending.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.