Hi,
I will explain my code
work in Linux (ubuntu) and c ++ (gcc). I have a code with sockets which makes the function of client-server and I wonder if you can pass through a socket to the client (in my case firefox) html code because I want to show a link to a file in
firefox!
for example:
strcpy(buffer,"<html><body><a href='A.txt'>EN</a></body></html>");
write(id_socket,buffer,strlen(buffer));
this show in firefox all code, all string! doesn't make the link!
I'm not sure I completely understand you. But I think you want to pass a link to a text file through your socket so that you can click on the link in Firefox to view the file?
Well you can certainly pass the link to Firefox as in your example. But your server would have to know how to deal with the request from Firefox to view the file that you passed the link to. Unless you serve that file up by other means (local web server...?).
Also, your example will not work unless you obey the rules of HTTP. First you need to send out the header information BEFORE you sent the HTML.