|
I decided that putting together something on pthreads in a Linux environment would be counterproductive. Like I said earlier, I'm not all that sure of how things work in Windows (ignorance is bliss, as they say) and thought that it would end up confusing you more.
If you are still looking for something (albiet Linux specific), give me a bit and I might have something by the end of the weekend.
[edit]
You should note, however, that 2roll4life7 is right, you dont need threads to get this to work (it actualy complicates things).
You should use two files (one for client, one for server) instead of trying to ram it all into one file. Follow the layout of the files I provided you. With that program, you open two windows, one for the client, one for the server. Run the server, then the client. What ever you type in the client window is sent to the server, a heading applied and output (in the server window).
Running them both in the same window (server in the bg) leads to strange/duplicate output.
Try this, detail problems and get back. Good luck.
__________________
"...and though our kids are blessed their parents let them shoulder all the blame."
- The Quiet Things That No One Ever Knows [BrandNew]
|