472,989 Members | 3,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

blocking i/o vs. non blocking i/o (performance)

Hi,
I'm writing a proxy application for rfb protocol (vnc), but i'm not
satisfied with it's performance. I'm using blocking i/o and the app
just read(...) from source and the write(...) to destination. The
performance diference between the client directly connected to the
server and the client passing thru the proxy is very visible. Does
non-blocking i/o solves my problem? Maybe the problem here is the
unnecessary(?) wait in write(...) function.

thank you.
obs. sorry about my poor english.
Nov 13 '05 #1
3 8575
On 9 Oct 2003 21:03:12 -0700, an***@kelmanson.net (Andre Kelmanson)
wrote in comp.lang.c:
Hi,
I'm writing a proxy application for rfb protocol (vnc), but i'm not
satisfied with it's performance. I'm using blocking i/o and the app
just read(...) from source and the write(...) to destination. The
performance diference between the client directly connected to the
server and the client passing thru the proxy is very visible. Does
non-blocking i/o solves my problem? Maybe the problem here is the
unnecessary(?) wait in write(...) function.

thank you.
obs. sorry about my poor english.


You need to ask in a newsgroup that supports your particular compiler
and operating system combination.

None of proxy, rfb, vnc, read(), write(), or non-blocking i/o are part
of the C language or its library, the topic here. C has no built-in
networking support at all. All such features are specific to the
implementation.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #2
an***@kelmanson.net (Andre Kelmanson) wrote:
# Hi,
# I'm writing a proxy application for rfb protocol (vnc), but i'm not
# satisfied with it's performance. I'm using blocking i/o and the app
# just read(...) from source and the write(...) to destination. The
# performance diference between the client directly connected to the
# server and the client passing thru the proxy is very visible. Does
# non-blocking i/o solves my problem? Maybe the problem here is the
# unnecessary(?) wait in write(...) function.

Non-blocking I/O can be useful if you are trying to do multiple simultaneous
reads and writes. If your process is doing a single read and write, that is
going to take the same amount of time whether your process suspends while
the kernel moves bytes or your process twiddles its thumb during that time.

--
Derk Gwen http://derkgwen.250free.com/html/index.html
No pleasure, no rapture, no exquiste sin greater than central air.
Nov 13 '05 #3
You may perform a task in another thread in parallel to data transfer even
with blocking IO. You should detect the bottleneck youself to determine
whether you need a multitasking. May be it is your communication channel too
slow and non-blocking IO does not help.
Nov 13 '05 #4

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

Similar topics

4
by: Jonathan Fine | last post by:
Hello I have written a program that interacts with a command line program. Roughly speaking, it mimics human interaction. (With more speed and accuracy, less intelligence.) It works fine...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
3
by: Robert A. van Ginkel | last post by:
In news:OZ0W9RsdDHA.2432@TK2MSFTNGP10.phx.gbl... I ask the question how I can see if all the data is on the other side of the connection. I got as answer that I should use the blocking property. I...
2
by: Bruce Vander Werf | last post by:
How can I cleanly stop a thread that is currently blocking on Socket.Receive? I don't want to use Thread.Abort, because I would like the thread method to exit cleanly, and the same code must run...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
11
by: Michi Henning | last post by:
Hi, I'm using a blocking Select() call on a socket with a timeout value of -1. I'd expect the call to block indefinitely, but it doesn't. When I use Poll() instead, a timeout of -1 works fine...
16
by: William Stacey [MVP] | last post by:
Anyone care to comment on if this non-blocking queue implementation is sound? /// <summary> /// Summary description for NonBlockingQueue. /// Modeled after:...
1
by: loosecannon_1 | last post by:
Hello everyone, I am hoping someone can help me with this problem. I will say up front that I am not a SQL Server DBA, I am a developer. I have an application that sends about 25 simultaneous...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.