September 23rd, 2003, 02:24 AM
TCP stream program,Create GUI and link with socket program
Dear people, I really need help for this as my school project is going to due but I have no idea on how to do it at all...Please help me if anyone knows how to do.Please help me, I only have three days to complete my assignment~Thank you very much~
I am require to develop a connection-oriented stream socket application with a server program and a corresponding client program.The server program that runs on a host will listen() to a Well-known-port for any incoming client connection.To connect to the server, the client will issue a connect() request to establish a connection-oriented stream with the server. If there is no error in the connection request, the sever will accept() the connection, and a new socket will be successfully created.The server then send() a string specified by the user out over the stream socket connection to the client.If the sending has no error,the client then recv() the data into a buffer and display the string received from the client before it close() the socket.Server subsequently will close() the new socket and continue to listen on its well-known-port for other lient requests(note: the server and client programs can be 2 processes running on the same host).
1.The client program to have a GUI interface for user to input the server IP address,Server port number,Client port number,text to send,text received.I have already created my own GUI but I don't know how to link it to the socket program.
2.take care of any possible error etc.check the return integers of the socket APIs to report any abnormalities.
I know I wm asking too much but I really have no idea on how to do not even starting,If anyone knows how to do the complete program please help me and send to my e'mail at email@example.com or firstname.lastname@example.org Thank you very much
September 23rd, 2003, 05:09 AM
Guess it's time to start reading about the networking functions. Socket, listen, connect, accept all look like good places to start to me. Also, if it's a class asignment they it has undoubtedly been covered in class. Talk with some of the other students and your prof.
Your statement tells me that you're completely lost. Might be a good idea to figure out if this programming this is really for you. With the market already being overcrowded, there's some merit to finding a different field of study. You'll have more work that's likely to be more enjoyable to you. If you can stomach it, accounting is a perenially good choice, and a lot of people I know who decided they didn't want to program have done well with it. Also, if you later decide that you want to program, it's a good knowledge area to have.
Articles and commentary on web development