Ok. Before I start on such a major change I would like to send data to my opened nc port. Now it is working that on a connection data is send back. I would like to manipulate the TCPexample so that it can send data.
I listen on port 84
Thenm I connect with TCPexample to the port.... How to send over data?
I tried just the part where the finger username is in the example, but nothing happens:
teh I looked in the origional code and saw that I just forgot one line after ....s := concat(user_name, cr, lf, cr, lf);
So now I changed the username variable to
and the port to 80.
Now TCP Example becomes a browser. It will get the default page on my server.
Later.... I will let it get the home page of 68kmla.org.... the we have a very simple browser!
I listen on port 84
Code:
#nc -l 84
I tried just the part where the finger username is in the example, but nothing happens:
Code:
C_Established: begin { Happens once per succesful connection establishment }
writeln('Connection Established');
s := concat(user_name, cr, lf, cr, lf);
if oe <> noErr then
CloseConnection(cp); { Better close the connection if we can't send anything to it! }
end;
Code:
s := concat(user_name, cr, lf, cr, lf);
oe := TCPSend(cer.tcpc, @s[1], length(s), true);
Code:
get /
Now TCP Example becomes a browser. It will get the default page on my server.
Later.... I will let it get the home page of 68kmla.org.... the we have a very simple browser!