Question
I am trying to create a three simple programs (two in C, one in Java) that will communicate over a network (a simple 'Hello world'
I am trying to create a three simple programs (two in C, one in Java) that will communicate over a network (a simple 'Hello world' message): a tcp-client in C, a tcp-client in java, and tcp-server in C. The programs must compile in a UNIX-based environment and execute system calls such as (but not limited to) socket(), bind(), gethostbyname(), gethostname(), read(), write(), send(), listen(), pthread_create(), pthread_detach(), getsockname(), and pthread_exit(), etc. For this inquiry, I am just interested in the server program although help with the client porgrams would be great as well. The server program must be able to accept multiple requests from clients and respond simultaneously. The server program (in C) will take a port number as an argument on the command line, used to bind the socket and recieve messages on the correct port; it will also create a server socket (not using auto-binding but the provided port number) for binding the socket. It then will wait for incoming requests from client programs. When a request is recieved, it should create a new detacthed thread used for interpreting the mesage by parsing. The messages recieved will be like html tags. For instance, if
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started