I am writing a C # password change page. I have not done a lot of socket programming, and I'm not sure if this is the best way.
There should be a console application (server) and an html page (client) with the following text fields:
Username [_______] Old password [______] New password [______] [Submit]
When the user clicks the "Submit" button, then a new stream will be created, where I will check if the information is good and some functions will be performed.
This should accept connections from multiple clients on a specific port.
How can i do this?
What i have done so far:
public static TcpListener Listener; public static int Port = 8080; static void Main(string[] args) { IniFile FPth = new IniFile(@"D:\ServerInfo.ini"); ServerPort = int.Parse(FPth.IniReadValue("ConnectionINFO", "ServerPort")); Listener = new TcpListener(IPAddress.Any, Port); Listener.Start(); Thread NewThread = new Thread(new ThreadStart(ChangingINFO)); ChangingINFO(); Console.WriteLine("Server is ONLINE."); } static ChangingINFO() { while (true) { Socket Sockt = Listener.AcceptSocket(); try { if (Sockt.Connected) {
But I do not know how to create an html page where I send information to the server and work with them.
source share