I have a Stream running at this URL: http://localhost:8000/admin
I want to connect to it via a TcpClient, but don’t know where I can specify the directory.
currently I do this:
tcpClient.Connect(IPAddress.Parse(“127.0.0.1”), 8000);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
TCP is the underyling protocol as does not have any concept of the ‘directories’. The portion of the URI that you are talking about is used by the HTTP web-server to specify the web page resource. In terms of TCP, an HTTP request for
http://localhost:8000/admintranslates to a TCP connection being made to port 8000 on the local host with the following request text:(There will be some more request headers than those shown, but those are the basic ones.)
You may wish to switch to using WebClient or somesuch instead.
See URI, TCP and HTTP.