?
Solved

Deamonprogramming Linux vs Windows NT

Posted on 1998-04-26
4
Medium Priority
?
160 Views
Last Modified: 2010-04-10
Hi
I am writing a program for companies who want to plan their workers time. The program communicate with a serverprogram on a Linuxmachine on a TCP/IP-port similar to a www-server and client.

I hope that anyone have a piece of code, with comments that describe how a connection starts, sends and finally closes. It's a twoway-connection, the server can do the same thing with the client.

Thanks Tord
0
Comment
Question by:tord_f
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1164268
What exactly is the problem?  Are you trying to do it on NT or on Linux?
0
 

Author Comment

by:tord_f
ID: 1164269
Its a client-server application. The clients is running Windows NT and connect to the serverprogram on a Unix or Linux machine. It's a demon like the httpd-process.

The serverprogram is responsibli for the database files, locking, user administration and other things.

The client is  graphical interface who presents the result to the user who in turn manipulate the database on the server.

It's working lika a www-connection. The server wait for a connection on a TCP-port and when a client connect to that port i communicate with that client an then close the connection.

But I dont know how to write that piece of code that wait, connect and wait.....

I am looking at Apache sourcecode but it's complex. I hope I can get it clear in this site and the answer show me the piece of code that is neccesary for full functionality.
0
 
LVL 11

Accepted Solution

by:
alexo earned 600 total points
ID: 1164270
I suggest you find a good reference about socket programming.  I can refer you to some "winsock" sites (the windows implementation of sockets, very similar to the unix "berkley" sockets if you ignore the MS additions):
  http://www.sockets.com
  http://www.winsock.com
  http://www.goodnet.com/~esnible/winsock.html

In general, check the listen() and accept() functions.
0
 

Author Comment

by:tord_f
ID: 1164271
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question