473,508 Members | 2,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sample server

Hello.

I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with examples
on how to implement it.

Thanks in advance,

Eugene.
Jul 22 '05 #1
6 1778
Eugene A wrote:
I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with examples
on how to implement it.


The answer to your request depends on what you mean by "server." The
C++ standard does not define the term. In order to get some ideas, try
googling for "BSD sockets."
Jul 22 '05 #2

"Jeff Schwab" <je******@comcast.net> wrote in message
news:8L********************@comcast.com...
Eugene A wrote:
I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with examples on how to implement it.


The answer to your request depends on what you mean by "server." The
C++ standard does not define the term. In order to get some ideas, try
googling for "BSD sockets."


Jeff,

I mean a program that is polling a port for messages and can produce a
response to that same port.

Thank you.
Jul 22 '05 #3
Eugene A wrote:
"Jeff Schwab" <je******@comcast.net> wrote in message
news:8L********************@comcast.com...
Eugene A wrote:

I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with
examples
on how to implement it.


The answer to your request depends on what you mean by "server." The
C++ standard does not define the term. In order to get some ideas, try
googling for "BSD sockets."

I mean a program that is polling a port for messages and can produce a
response to that same port.


The C++ language and standard libraries don't have any facilities for
working with "ports," nor do they define the concept of a port.
However, third-party libraries are available. The details depend on
your platform. Google for BSD Sockets.
Jul 22 '05 #4
Eugene A wrote:
"Jeff Schwab" <je******@comcast.net> wrote in message
news:8L********************@comcast.com...
Eugene A wrote:
I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with exampleson how to implement it.


The answer to your request depends on what you mean by "server." The
C++ standard does not define the term. In order to get some ideas, try
googling for "BSD sockets."


I mean a program that is polling a port for messages and can produce a
response to that same port.


C++ doesn't have "ports" either. Is this for some specific OS and
compiler? You might be able to find examples in that compiler's
documentation.

Jul 22 '05 #5
Eugene A wrote:
"Jeff Schwab" <je******@comcast.net> wrote in message
news:8L********************@comcast.com...
Eugene A wrote:

I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with
examples
on how to implement it.


The answer to your request depends on what you mean by "server." The
C++ standard does not define the term. In order to get some ideas, try
googling for "BSD sockets."

Jeff,

I mean a program that is polling a port for messages and can produce a
response to that same port.

Thank you.


Depends on how your platform defines "port". On the embedded system
that I am working on, we have 3 ports: 2 serial, one USB. We listen
to the ports and produce response messages back.

The code is written in C, but uses platform specific routines for
accessing the ports.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #6
"Eugene A" <lo*****@mailandnews.com> wrote in message news:<27******************************@news.terane ws.com>...
Hello.

I am looking for a source for a simple server that would just listen to
requests and produce responses to those requests. Prefarrably with examples
on how to implement it.

Thanks in advance,

Eugene.


Try http://www.alhem.net/Sockets/ - example 5 is a tcp/ip client/server thing.
Good luck.
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3132
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
4
6250
by: Joey | last post by:
Does anyone know how to center this sample webpage in Firefox? If so, will you provide the example as it applies to this sample webpage? I have read numerous posts and articles on how to center...
7
3821
by: John Blair | last post by:
Hi, I am trying to get the datacache1 sample working on my PC. I have downloaded the MSDE 2000 sample SQL Server database and the pubs sample database and installed it. I can view the contents...
10
4390
by: celoftis | last post by:
Using VS 2005: This morning, following the instructions here: http://ajax.asp.net/docs/overview/InstallingASPNETAJAX.aspx, I installed ASP.NET AJAX on my WinXP Pro development machine. Following...
5
2340
by: Will | last post by:
- I know enough ASP and Access to be dangerous :) - I need to put up a data base on our web server with 3 related tables. - They will be accessed by a limited number of people. - Each user will...
1
3322
by: Sin Jeong-hun | last post by:
I need to write little applications with c/s model. I need basic features like, 1)The server should be able to handle multiple clients at the same time. (multithreaded) 2)The clients and the...
5
16111
by: Otto Wyss | last post by:
I've now been looking for a week for a simple but useful sample on how to get a list of entries (persons) via an XMLHttpRequest using Json/PHP on the server. So far I've found about a thousend...
15
2598
by: (PeteCresswell) | last post by:
Some time within the next nine months, there's a pretty good chance I'll have the "opportunity" to port a bond trading system that I wrote - whose front end is currently MS Access - to .NET. ...
4
4546
by: Not Me | last post by:
Hi there, I've been having a few issues using features from the AjaxControlToolkit, but have reverted to simply trying to sun the SampleWebSite on my server - and I can't even get that to work!...
2
3106
by: kirthi.amudha | last post by:
Hi, I have app dev client installed on my machine. Can we create the sample database using db2sampl. I was able to create database using the 'Create Database' command. But I am not able...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7326
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
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
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...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.