Sponsored Content
Top Forums Programming How to avoid 'No buffer space available' on C socket? Post 302860955 by Corona688 on Monday 7th of October 2013 03:49:59 PM
Old 10-07-2013
It's not hard for a program to fill a buffer far faster than your network can send data. That is why you're running out of buffer. You'll just have to trust the OS to send the data as fast as it can, unless you feel like writing your own driver.
 

10 More Discussions You Might Find Interesting

1. Programming

how to clear/clean mbufs (network buffer space)?

When I worked with client-server (socket) programming, I encountered "the socket error# 10055" which means "No buffer space available". This might be a symptom of one or more applications that didn't return system resources (like memory) properly. Temporary solution was to reboot the machine to... (7 Replies)
Discussion started by: dipti
7 Replies

2. Linux

ssh: connect to host traviata port 22: No buffer space available

What does that mean? traviata being my distant host? What am i to do? (0 Replies)
Discussion started by: penguin-friend
0 Replies

3. Shell Programming and Scripting

how to avoid space to run remotely

If I run the following command remotely after ssh than it works fine su - oracle -c "/oracle/product/102/db/bin/dbshut" But If I run the following command it doesn't work su - oracle -c "/oracle/product/102/db/bin/lsnrctl stop" Because I think there is a space is present between lsnrctl and... (1 Reply)
Discussion started by: madhusmita
1 Replies

4. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

5. Shell Programming and Scripting

How to avoid the space

Hi, I have some problem with following command. $path='pwd'.”/pack”; When I check the value in the variable path , it give the following output /tmp/new /pack The pwd will be /tmp/new Now the problem is the spaces is added between pwd and the appended path. I need the output like... (5 Replies)
Discussion started by: kalpeer
5 Replies

6. Programming

Finding used socket receive-buffer size

I have set the receive buffer size of socket to max. setsockopt(sd,SOL_SOCKET, SO_RCVBUF,&max,optval); Am reading data from the socket in a loop(say max 100 bytes per recv) while(1) { int rlen=recv(sd,(void *)buf, 100 , 0); //err handle and processing } Assume my process is slow... (2 Replies)
Discussion started by: johnbach
2 Replies

7. Programming

Store file into a buffer to send it through a socket

Hello, I'm doing a very simple program which reads a file and sends whatever is in the file through a socket. Like the program "file2cable". Let's say i have a file containing the following, which is a hex dump of an ARP request frame: ff ff ff ff ff ff 00 1b 24 79 5a 73 08 06 00 01 08... (5 Replies)
Discussion started by: semash!
5 Replies

8. Linux

Linux Device Driver: avoid mem copy from/to user/kernel space

I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel. 1. The user space process makes an IOCTL call with pointer to a user memory buffer. 2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
Discussion started by: agaurav
1 Replies

9. Shell Programming and Scripting

How to avoid the truncating of multiple spaces into a single space while reading a line from a file?

consider the small piece of code while read line do echo $line done < example content of example file sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the output is like sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the... (4 Replies)
Discussion started by: Kesavan
4 Replies

10. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
OB_END_FLUSH(3) 							 1							   OB_END_FLUSH(3)

ob_end_flush - Flush (send) the output buffer and turn off output buffering

SYNOPSIS
bool ob_end_flush (void ) DESCRIPTION
This function will send the contents of the topmost output buffer (if any) and turn this output buffer off. If you want to further process the buffer's contents you have to call ob_get_contents(3) before ob_end_flush(3) as the buffer contents are discarded after ob_end_flush(3) is called. The output buffer must be started by ob_start(3) with PHP_OUTPUT_HANDLER_FLUSHABLE and PHP_OUTPUT_HANDLER_REMOVABLE flags. Otherwise ob_end_flush(3) will not work. Note This function is similar to ob_get_flush(3), except that ob_get_flush(3) returns the buffer as a string. RETURN VALUES
Returns TRUE on success or FALSE on failure. Reasons for failure are first that you called the function without an active buffer or that for some reason a buffer could not be deleted (possible for special buffer). ERRORS
/EXCEPTIONS If the function fails it generates an E_NOTICE. EXAMPLES
Example #1 ob_end_flush(3) example The following example shows an easy way to flush and end all output buffers: <?php while (@ob_end_flush()); ?> SEE ALSO
ob_start(3), ob_get_contents(3), ob_get_flush(3), ob_flush(3), ob_end_clean(3). PHP Documentation Group OB_END_FLUSH(3)
All times are GMT -4. The time now is 08:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy