[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Deamonprogramming Linux vs Windows NT

Posted on 1998-04-26
4
Medium Priority
?
163 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
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

868 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