Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-31-2005, 12:59 AM
|
#1
|
LQ Newbie
Registered: Aug 2005
Posts: 1
Rep:
|
Server in Linux and Client in Windows
i have to develop a client server application in which server is runing over Linux and Client is runing over Windows. wht problems can i face for doing so?, is it possible to do so? or any material which can help me to achieve my objective.
thnx
|
|
|
08-31-2005, 01:10 AM
|
#2
|
Member
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895
Rep:
|
It's most definitely possible. A perfect example is that many web servers run Apache in a Linux environment, and browsers running in Windows have no problem at all communicating with them.
You'll most likely want to learn how to program with sockets, and develop a well defined protocol that the two apps will agree on. As in my web server example. Both the server and client understand the HTTP protocol, and thus are able to communicate regardless of their underlying platform.
One thing to watch for is if you develop a protocol that sends and receives binary data, you must be aware of endianness. Endianness isn't OS specific, but more specific to the processor architecture. That is, an Intel chip uses a little endian format regardless of whether it runs Linux or Windows. But, you may be running Linux on an Alpha or Sparc or anything else that has the possibility to be big endian. Your protocol should ensure that if binary data is passed, it agrees on an endianness for how numeric values are passed.
|
|
|
08-31-2005, 04:45 AM
|
#3
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
What languages do you know?
What I would do is, not bother with C socket programming to start with.
Use something like perl or tcl/tk to prototype a quick application.
It's relatively easy to get some communication between two machines this way.
The hard bit is always getting your communication worked out!
You can concentrate on getting your design working
as it's much easier to code than if using C.
Then if you get the two halves talking, your top level design works.
if need be you can recode in C.
you won't have the
double problem of getting your socket programming right too!
just a thought 
|
|
|
08-31-2005, 08:56 AM
|
#4
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,262
|
Quote:
Actum Ne Agas
-- "Do Not Do A Thing Already Done"
|
These requirements are old-hat in the computing world. You do not need to start from scratch. You do not need to start out by "hacking sockets." Instead of letting your thoughts jump ahead to "low-level" implementation details, keep your view "high-level" as long as possible.
Start by defining, in detail, what the application needs to do, and for whom. Not how, but what. Once you have done that, in a week or two, proceed to identify -- and research to some degree -- at least five ways that the job could be done, using five different tools. Choose the simplest; not the slickest.
It is also desirable to design so that "it doesn't matter which machine is driving the train." Development tools and techniques should be common to both. That can take some doing.
Remember also, your "prototype" will be your finished work, so delay creating prototypes as long as possible.
|
|
|
08-31-2005, 09:37 AM
|
#5
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
I think you'll find it very hard to design something for TCP streams
without playing with them first.
How can you define in detail if you have no experience of how
TCP streams operate?
|
|
|
All times are GMT -5. The time now is 09:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|