LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-06-2011, 11:39 AM   #1
suicidal_fork_bomber
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
How to simulate slow connection


Hi there!
I'm trying to write a simple C program which will POST some binary data to remote http server using libcurl. The problem is that I want this binary data be generated in real time.

Here is the actual way to post binary data using libcurl:

curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, binary_pointer);

If I'll pass some function which will generate binary data as "binary pointer" argument to curl_easy_setopt(); It will just wait while my function finishes generating data and then send it.

The question is how can I perform a POST http request in conveyor way
e.g. One byte generated -> one byte send?

Using Debian Squeeze(linux kernel) and HTTP/1.0 protocol
 
Old 12-06-2011, 06:40 PM   #2
zooppoop
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 1
Why not just Pipe the data from another output source?
 
Old 12-07-2011, 03:41 AM   #3
suicidal_fork_bomber
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
I solved this problem using BSD sockets API
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DSL connection slow on Linux wired connection but fast on Windows wireless Pandarsson Linux - Wireless Networking 9 12-17-2010 05:55 PM
simulate proxy internet connection bjdodo Linux - Networking 4 09-16-2009 06:11 AM
LXer: How to simulate a slow network with 'wanem' LXer Syndicated Linux News 0 10-15-2007 10:30 PM
PopTop and Simulate Multi user connection omid1979 Linux - Networking 1 08-23-2005 09:37 AM
New Fedora Internet connection slow slow slow matrim Fedora 9 07-29-2005 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration