?
Solved

how do I impliment my tcp client server programing asynchronous

Posted on 2006-07-17
8
Medium Priority
?
445 Views
Last Modified: 2008-02-01
Hi,

I have implement tcp client/server programming which is synchronous i.e. when a request come, it serves that request the goes to others request. Now I want to incorporate a feature that will make my program asynchronous.. i.e., when a request from client is served.. then server goes to listen mode to accept another connection from client...

pls help me as soon as possible..
0
Comment
Question by:arijit_rebaca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17121037
Hi,
  Richard Stevens book contains a very good description on that subject. Please consider buying one if you are into network programming.

1) use select and poll
2) use O_NONBLOCK on socket descriptors.

description here:
http://squirl.nightmare.com/medusa/async_sockets.html

regards
Manish regmi
0
 

Author Comment

by:arijit_rebaca
ID: 17121094
at present I have no Richard Stevens book .... So pls depict an example using select() and poll()

as soon as possible
0
 
LVL 8

Accepted Solution

by:
manish_regmi earned 800 total points
ID: 17121152
download sample codes for Stevens book from here
http://www.kohala.com/start/unpv12e.html

it is unv12e.tar.gz

unzip and see the advio folder for asynchronous io codes.

You can ask if you don't understand anything.

regards
Manish Regmi

0
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.

 

Author Comment

by:arijit_rebaca
ID: 17121214
it can't gunzip under linux.. using

gunzip unv12e.tar.gz

it gives unexpected end of file
0
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17121229
may be download is corrupted. Its working fine for me.

try downloading again

try using
tar xzf filename

regards
Manish Regmi


0
 

Author Comment

by:arijit_rebaca
ID: 17121442
ya got it...

but there are so many folder and file.... where I should look in... pls tell me... the required folder and file for select and poll code

0
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17122580
advio folder

Here is some info on poll and select:
http://builder.com.com/5100-6372-1044098.html

regards
Manish Regmi
0
 
LVL 2

Expert Comment

by:Razor2k5
ID: 17144296
As network programming is based on 2 concepts : connection oriented TCP or connection less UDP

So the server can be concurent or iterative. The protocol that you use it's up to you to implement. So you can create a heap or a list based on priority.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 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