473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Network Programming: Multithreads

Hi all,
I want to implement a proxy server in C.
That proxy server stands there for several concurrent client requests
& services them.
Using select(), it is working fine.
But I want to make my proxy work more efficiently.
So What is the next thing I can do?

whether there is any more thing should added with select()?
or should I move away from select() and go for multithreaded...?
or select() + multithreads ?

If multithreads should come there, please can some one give a simple
explanation for thread implementation...simple code( I want to use
POSIX thread library)
Actually, I wrote it using thread ah!...
//server code
int main(){
while(true){
//create a thread using pthread.h create_pthread()
//thread_join();
}

ThreadFunction(){
// coded What should client do
}

I couldn't see thread concept is working there. server works for one
client and then next one(in order), but not switching between threads
when one is reading a file, other thread should in work. but....:-(

Thanks a lot.
Pradeepag
Nov 14 '05 #1
3 2846
pradeepag <pr******@cse.mrt.ac.lk> scribbled the following:
Hi all,
I want to implement a proxy server in C.
That proxy server stands there for several concurrent client requests
& services them.
Using select(), it is working fine.
But I want to make my proxy work more efficiently.
So What is the next thing I can do?


Well, asking POSIX questions on comp.unix.programmer would be a start.

(Snip POSIX-specific code)

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"He said: 'I'm not Elvis'. Who else but Elvis could have said that?"
- ALF
Nov 14 '05 #2
On 26 Jan 2004 02:32:21 -0800, in comp.lang.c , pr******@cse.mrt.ac.lk
(pradeepag) wrote:
Hi all,
I want to implement a proxy server in C.
That proxy server stands there for several concurrent client requests
& services them.
Using select(), it is working fine.
But I want to make my proxy work more efficiently.
So What is the next thing I can do?


ask in the right group. Everything you talk about above is offtopic
here. Try comp.unix.programming.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #3
Thanks a lot for all your guide.
I was new to google groups....
And Even I put subject as Network programming, C and threads(how to
handle threads in C) were in my mind.

Thanks again.
pradeepag
Nov 14 '05 #4

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

Similar topics

8
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork =...
1
by: mch2k2 | last post by:
Hello All I have just started working on Pyhton. I need urgent help regarding Python Network Programming. I want the elctronic version of the Book: Foundations of Python Network programming by...
3
by: Jay | last post by:
Hi, I implemeneted an FTP client and server long time back using Java. I found sockets porgramming in java quite useful and easy to handle. I now wanted to implement a similar program using C++....
6
by: John Walton | last post by:
Hello, everyone. I just began school, and they already assigned us science fair. Since I'm in 8th grade, I get to do demonstrations for our projects. I'm probably going to demonstrate Python's...
4
by: Wayne M J | last post by:
I have "Professional .Net Network Programming" and "Network Programming for MS Windows 2nd Ed", but I find both of these to be lacking in what I am looking for. Has there been any books printed...
5
by: Terry | last post by:
Could someone please suggest me a good book to learn network programming. I have been programming in C#/VB.NET/VB 6.0 and have also used a bit of C++ (not MFC/ATL/COM) I am a total novice when...
6
by: Eric | last post by:
Does anyone know of any GOOD network programming book(s) that are C# based, as well as any online tutorials and forums on network programming? Thanks
2
by: ppuniversal | last post by:
Hello, Can someone tell a good Tutorial on Network Programming in C++, except Beej's Guide and Vijay Mukhi's tutorials. I want to make a Client Server application in C++ which will involve...
9
by: Mex | last post by:
Hi, I'm looking for a good book for beginners about Network Programming. Besides Stevens' book, I would like something specific for C++ language. Any suggestions? Thanks in advantage, Massimo
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.