473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Server-Client with this with these functions

Hi I need to make a client socket - server in c + + for Linux.

The server must do three things:
1 -) When the client sends a file server lowercase words you must return the file with words capitalized

2 -) When the client sends a file server capitalized words you must return the file with words lowercase.

3 -) Capitalize the first letter of each word in a file.

4 -) Send me a number and return it in letters example 1 and return one to me.

I have several codes of client - server in c + + for linux but not in that part of the code to the features or how we do. Appreciate your response.
Nov 13 '09 #1
2 1711
I can't see your question there... people won't do the entire code for you, you have to start it and when you have a question/error will help you.

You can start with the cctype (ctype.h) library, there are functions that will check/set your chars to lower/upper case. As for sockets, you have to google it or read a book.

For your third exercise you can use strtok (tokenizer) and capitalize the first letter.
For the fourth.. well.. I didn't get it, maybe you typed some random words in there.
Nov 13 '09 #2
RRick
463 Expert 256MB
This program or actually set of programs is not that hard to write, but its not trivial either. There are 2 or possibly 3 major parts to this problem.

First, you need to write code for a client and a server using sockets as the communication. There are lots of examples of this. Try googling "client server socket c++".

Once you can get the client and the server set up and talking to each other, you need to figure out a protocol that both of them understand. It sounds like your problem just has the client send data and the server will read the data, change it and send it back to the client. If this is true, you simply have the client send the data and read the results from the server. Also, if this is true, the #3 change is not compatible with change #2.

Sometimes, the client will use a simple protocol, where it first sends a command and then the data. You have to figure out what you need here.

Lastly, you need to do the work and Sprialfire gave you some ideas of how to do that. It sounds like you need to break the file into words and strtok can do that. In C++, you can use an istringstream to parse the words.
Nov 14 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Philip Trim | last post by:
General Brief: 3 SQL Servers as MS SQL Server 2000 Standard Edition with Service Pack 3 All using FTP for snapshots All Servers are both Publishers and Distributors. Server A has the correct...
5
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create...
6
by: xo55ox | last post by:
After setting up the linked server connection at the standby server, I tried to xcopy a file through the sql server 2000 schedule task to the standby server's shared directory. But it keeps giving...
5
by: shenanwei | last post by:
I have a primary server and backup server located in different physical sites. The primary server is live and ship logs to backup site every 5 minutes. The primary server is being full online...
29
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them...
1
by: Piotrek Stachowicz | last post by:
Hi, I'd like to display list of all MS SQL servers which are available on the network (I write application which uses database located on one of the machines in my LAN). Has anyone got any idea...
12
by: RKay | last post by:
I have a Win2k server running SQL Server 2000. On that box I built a working web service that pulls data from the database. One of the services available simply accepts an ado.net connection string...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
14
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can...
9
by: fniles | last post by:
I would like to copy a table(s) from SQL Server 2005 to a CVS file and vice versa. I was thinking to use the BCP command line utility, but I have a few questions: 1. The machine where I am...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.