PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > comp.protocols.tcp-ip > send more data on the socket > socket buffer can handle
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.protocols.tcp-ip TCP and IP network protocols.

send more data on the socket > socket buffer can handle

Réponse
 
LinkBack Outils de la discussion
Vieux 21/04/2007, 00h42   #1
Vinay Nagrik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut send more data on the socket > socket buffer can handle

Hello Group,

Recently I came across this question asked to me.

Is there any flag you can set so that you are allowed to send more
data on the socket in the calls to sentto/send, than the internal
socket buffer can handle.

Is there any way. And if there is no way then what is a way out.

Thanks for your .

nagrik

  Réponse avec citation
Vieux 22/04/2007, 01h25   #2
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: send more data on the socket > socket buffer can handle

In article <1177112559.470678.217590@d57g2000hsg.googlegroups .com>,
Vinay Nagrik <jainarunk@gmail.com> wrote:

> Hello Group,
>
> Recently I came across this question asked to me.
>
> Is there any flag you can set so that you are allowed to send more
> data on the socket in the calls to sentto/send, than the internal
> socket buffer can handle.


If you could, where would it put it?

If it's a UDP socket, and you want it to just drop the data, I think you
could do this by setting the socket to non-blocking mode. The call to
send/sendto would report the error EWOULDBLOCK, and you can choose what
to do with the packet you were trying to send.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
Vieux 22/04/2007, 05h28   #3
Vernon Schryver
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: send more data on the socket > socket buffer can handle

In article <barmar-987B2D.20252721042007@comcast.dca.giganews.com>,
Barry Margolin <barmar@alum.mit.edu> wrote:

>> Is there any flag you can set so that you are allowed to send more
>> data on the socket in the calls to sentto/send, than the internal
>> socket buffer can handle.


>If it's a UDP socket, and you want it to just drop the data, I think you
>could do this by setting the socket to non-blocking mode. The call to
>send/sendto would report the error EWOULDBLOCK, and you can choose what
>to do with the packet you were trying to send.


Whether that makes any sense depends on which flavor of sockets is
involved. In the flavor I feel most comfortable with, whether you use
a non-blocking socket or not, sendto() does not block if you call it
too often. 4.*BSD style sendto() instead fails with ENOBUFS. To see
if someone had changed things when I wasn't looking, I just now tested
sending to port 9 from a FreeBSD 6.2 system. See
http://www.google.com/search?q=enobufs


Vernon Schryver vjs@rhyolite.com
  Réponse avec citation
Vieux 23/04/2007, 10h41   #4
David Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: send more data on the socket > socket buffer can handle

On Apr 20, 4:42 pm, Vinay Nagrik <jainar...@gmail.com> wrote:
> Hello Group,
>
> Recently I came across this question asked to me.
>
> Is there any flag you can set so that you are allowed to send more
> data on the socket in the calls to sentto/send, than the internal
> socket buffer can handle.
>
> Is there any way. And if there is no way then what is a way out.


What is the problem? If you need to send more data than the buffer can
hold, send the data later. If you literally have no place to put the
data, either discard it or disconnect the client as is appropriate for
the network protocol you are using.

DS

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h12.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11377 seconds with 12 queries