-
May 18th, 2007, 09:59 AM
#1
Linux Client Server problem
Hi. I've got a bit of a problem. I'm supposed to write an app in C(no C++ allowed I guess) for a school project that will send a folder name to a Linux server, and, after returning with information from the server, it's supposed to list all the text files in that directory. The app will not run on the server.
Does anyone know any links/information as to where I might be able to find out how to do this? Anything would help I guess. I've no idea where to start, and google hasn't helped either. Thanks in advance.
Edit: I think the app has to use process pipes, etc. That's the chapter the project is under, but I don't know how exactly they could be used.
Last edited by danutz_plusplus; May 18th, 2007 at 10:14 AM.
-
May 18th, 2007, 10:16 AM
#2
Re: Linux Client Server problem
Does netcat fit your needs?
Edit:
Noticed the pipe hint too late.
Yes, of course you can use pipes, but I don´t know details on pipes on *nix. The basic procedure is to write a server application that creates a named pipe on the local machine and listens on this pipe.
Then you need to write a client application that connects to the server´s pipe and send data through this pipe to the server.
Hope this helps at least a little bit
Last edited by GNiewerth; May 18th, 2007 at 10:19 AM.
- Guido
-
May 18th, 2007, 10:28 AM
#3
Re: Linux Client Server problem
Originally Posted by GNiewerth
Does netcat fit your needs?
Edit:
Noticed the pipe hint too late.
Yes, of course you can use pipes, but I don´t know details on pipes on *nix. The basic procedure is to write a server application that creates a named pipe on the local machine and listens on this pipe.
Then you need to write a client application that connects to the server´s pipe and send data through this pipe to the server.
Hope this helps at least a little bit
Oh. Ok. I think I get the overall idea. And I think I'm not supposed to actually make the apps communicate over the actual network. I think I just have to simulate this on the client pc, but with internal pipes, not named pipes. I overlooked this in my assignment. So this should take some of the load off me. Thanks for your help.
-
May 18th, 2007, 10:32 AM
#4
Re: Linux Client Server problem
You´re welcome
- Guido
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|