On Suday the 11th of February, 2007 -after 3 and a half years on InvisionFree, we have moved! This old board remains as a read only archive of years past, and registration has been disabled here. All new and current members should register at http://www.cpplc.net/forum .


InvisionFree gives you all the tools to create a successful discussion community.
InvisionFree - Free Forum Hosting
Welcome to C++ Learning Community. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Name:   Password:

Please help out
Google

  Reply to this topicStart new topicStart Poll

> writing a simple multi-threaded program, writing a simple multi-threaded program
cockytrumpet
Posted: Apr 18 2005, 12:04 AM
Quote Post


N00b!!!


Group: Members
Posts: 1
Member No.: 1,288
Joined: 17-April 05



I'm writing a program for my networking class. The rest of the class is using python to make a simple SMTP server, but as I've never learned python, I got permission to use C++. The (wierd) requirement of the assignment is that when the user enters the "DATA" command, the server connects back to the client to retrieve the data.

My problem, is that I'll need the loop that reads the commands from the client to be running in a separate thread so I can start the server and type something like "connect 10.0.0.2" to connect to another server and still be able to read commands from another client.

So, does anyone know of a (very) simple threading library without all the bells and wistles that I could use for this project?
PMEmail Poster
Top
KTC
Posted: Apr 18 2005, 01:06 AM
Quote Post


std::freak


Group: Members
Posts: 1,465
Member No.: 420
Joined: 30-December 03



Well, I don't know about the without bells and wistles part, but Boost is a very good library, widely supported, some of it likely to end up in C++0x, proven track record, etc. etc.


--------------------
PMUsers Website
Top
dorto
Posted: Apr 18 2005, 07:57 AM
Quote Post


geek


Group: Members
Posts: 268
Member No.: 1,143
Joined: 20-December 04



learning and then using thread library from boost would be better but if you lack the time then go for 'pthreads' which is what most C/C++ programmers use to create multi-threaded apps under gnu/linux. its very simple to learn and use(the library, not multi-threading concepts!) search for some simple tutorials on google, like this:
http://www.yolinux.com/TUTORIALS/LinuxTuto...sixThreads.html


--------------------
dorto

Absolute Beginner(programming): 'You Can Do It' by Francis Glassborow
Absolute Beginner(c++): 'Accelerated C++' by Andrew Koenig and Barbara Moo
Free Online Book: http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
C++ Bible: 'The C++ Programming Language' by Bjarne Stroustrup
PMEmail Poster
Top
« Next Oldest | C++ for Linux | Next Newest »
InvisionFree - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Register Now

Topic Options Reply to this topicStart new topicStart Poll


Skin selector developed by XJONX. Skins created by various members of the IF Skin Zone and InvisionFree Skinning

Please help out
Hosted for free by InvisionFree* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0650 seconds | Archive