Question

I have a machine to which i need to be connected to retrieve the data into the text file.For this I have the Ip address,Port number,Username,password of the machine .Now i am trying to connect to the machine but i am not getting where to pass the username and password of the machine to be connected in my c# code.

Please help me.

Était-ce utile?

La solution

The comments already give the answer, but to summarize:

  • For the TCP protocol, it only matters how to connect A and B to enable data transport.
  • Anything beyond successful connection is a matter of the inner application protocol that you use
  • You need the description of the service and what to send and receive
  • You started with your greeting message "Client here". Thats the way how to also transmit user name & pasword I assume.
  • For example it could be that after your "Client here" message the server will respond with "User?" and you will have to send the username. Then maybe "Pass?" and you will reply with pass. But this is up to the developer of the server part

Good luck & BR Florian

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top