im trying to do telnet command in server through client pc. ive read about it and people says i only need socket for the whole job.from what ive understand about this reading is that a client socket will connect to the server where a socket is listening. after that, the command will be sent by the client socket and the server socket will receive it and perform the command. but if this is the whole flow then its useless to use socket, why not just directly do system("telnet command"); or a shellexecute? or im just understand it wrong? can someone explain me ? if i understand it whole wrong
You'd use the socket library within your program to communicate with an external server over TCP or UDP. Each server will have its own protocol to interact with it, so you have to observe it. For example: http://www.cplusplus.com/forum/unices/226435/
i just did a client-server socket. the client socket sits on different pc while server socket sits on the server. and thats the only way i can do to do the job and just like i said before the command sent by client socket is executed by the server socket application using shellexecute. but it took me 2 separate programs. its not really possible to have only client socket and connect to the server pc and make that pc execute my command? without having server application.