| Newsgroups |
gmane.comp.hardware.rabbit-semiconductor |
| Message-ID |
<2050369376.1014400.1417063763748.JavaMail.yahoo@jws10063.mail.ne1.yahoo.com> |
That's a good idea. The documentation didn't say anything about taking a NULL pointer, but I will check the source code when I get back in the office.
For now, I've implemented a loop to read bytes until itsempty. That works, but it takes more code than I would like. I'm near the end of program memory so I try to save every byte.
Thanks Tom.
From: "Tom Collins tom-lnEA/wrDJtNWk0Htik3J/[email protected] [rabbit-semi]" <[email protected]>
To: [email protected]
Sent: Wednesday, November 26, 2014 5:13 PM
Subject: Re: [rabbit-semi] Clear TCP receive buffer
I don't have DC 9.62 handy to check, but is it possible that sock_fastread() will accept NULL for the buffer parameter, to read from the socket without actually copying the data?
-Tom
On Nov 24, 2014, at 12:21 PM, seecwriter-/[email protected] [rabbit-semi] wrote:
I don't see a function that will clear the receive buffer of a tcp socket in the manual. Is there one, or do I have to read bytes until the buffer goes empty? I'm using DC 9.62.
#yiv8585438185 #yiv8585438185 -- #yiv8585438185ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8585438185 #yiv8585438185ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8585438185 #yiv8585438185ygrp-mkp #yiv8585438185hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv8585438185 #yiv8585438185ygrp-mkp #yiv8585438185ads {margin-bottom:10px;}#yiv8585438185 #yiv8585438185ygrp-mkp .yiv8585438185ad {padding:0 0;}#yiv8585438185 #yiv8585438185ygrp-mkp .yiv8585438185ad p {margin:0;}#yiv8585438185 #yiv8585438185ygrp-mkp .yiv8585438185ad a {color:#0000ff;text-decoration:none;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ygrp-lc {font-family:Arial;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ygrp-lc #yiv8585438185hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ygrp-lc .yiv8585438185ad {margin-bottom:10px;padding:0 0;}#yiv8585438185 #yiv8585438185actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8585438185 #yiv8585438185activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8585438185 #yiv8585438185activity span {font-weight:700;}#yiv8585438185 #yiv8585438185activity span:first-child {text-transform:uppercase;}#yiv8585438185 #yiv8585438185activity span a {color:#5085b6;text-decoration:none;}#yiv8585438185 #yiv8585438185activity span span {color:#ff7900;}#yiv8585438185 #yiv8585438185activity span .yiv8585438185underline {text-decoration:underline;}#yiv8585438185 .yiv8585438185attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv8585438185 .yiv8585438185attach div a {text-decoration:none;}#yiv8585438185 .yiv8585438185attach img {border:none;padding-right:5px;}#yiv8585438185 .yiv8585438185attach label {display:block;margin-bottom:5px;}#yiv8585438185 .yiv8585438185attach label a {text-decoration:none;}#yiv8585438185 blockquote {margin:0 0 0 4px;}#yiv8585438185 .yiv8585438185bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv8585438185 .yiv8585438185bold a {text-decoration:none;}#yiv8585438185 dd.yiv8585438185last p a {font-family:Verdana;font-weight:700;}#yiv8585438185 dd.yiv8585438185last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8585438185 dd.yiv8585438185last p span.yiv8585438185yshortcuts {margin-right:0;}#yiv8585438185 div.yiv8585438185attach-table div div a {text-decoration:none;}#yiv8585438185 div.yiv8585438185attach-table {width:400px;}#yiv8585438185 div.yiv8585438185file-title a, #yiv8585438185 div.yiv8585438185file-title a:active, #yiv8585438185 div.yiv8585438185file-title a:hover, #yiv8585438185 div.yiv8585438185file-title a:visited {text-decoration:none;}#yiv8585438185 div.yiv8585438185photo-title a, #yiv8585438185 div.yiv8585438185photo-title a:active, #yiv8585438185 div.yiv8585438185photo-title a:hover, #yiv8585438185 div.yiv8585438185photo-title a:visited {text-decoration:none;}#yiv8585438185 div#yiv8585438185ygrp-mlmsg #yiv8585438185ygrp-msg p a span.yiv8585438185yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv8585438185 .yiv8585438185green {color:#628c2a;}#yiv8585438185 .yiv8585438185MsoNormal {margin:0 0 0 0;}#yiv8585438185 o {font-size:0;}#yiv8585438185 #yiv8585438185photos div {float:left;width:72px;}#yiv8585438185 #yiv8585438185photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv8585438185 #yiv8585438185photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv8585438185 #yiv8585438185reco-category {font-size:77%;}#yiv8585438185 #yiv8585438185reco-desc {font-size:77%;}#yiv8585438185 .yiv8585438185replbq {margin:4px;}#yiv8585438185 #yiv8585438185ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv8585438185 #yiv8585438185ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv8585438185 #yiv8585438185ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv8585438185 #yiv8585438185ygrp-mlmsg select, #yiv8585438185 input, #yiv8585438185 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv8585438185 #yiv8585438185ygrp-mlmsg pre, #yiv8585438185 code {font:115% monospace;}#yiv8585438185 #yiv8585438185ygrp-mlmsg * {line-height:1.22em;}#yiv8585438185 #yiv8585438185ygrp-mlmsg #yiv8585438185logo {padding-bottom:10px;}#yiv8585438185 #yiv8585438185ygrp-msg p a {font-family:Verdana;}#yiv8585438185 #yiv8585438185ygrp-msg p#yiv8585438185attach-count span {color:#1E66AE;font-weight:700;}#yiv8585438185 #yiv8585438185ygrp-reco #yiv8585438185reco-head {color:#ff7900;font-weight:700;}#yiv8585438185 #yiv8585438185ygrp-reco {margin-bottom:20px;padding:0px;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ov li a {font-size:130%;text-decoration:none;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv8585438185 #yiv8585438185ygrp-sponsor #yiv8585438185ov ul {margin:0;padding:0 0 0 8px;}#yiv8585438185 #yiv8585438185ygrp-text {font-family:Georgia;}#yiv8585438185 #yiv8585438185ygrp-text p {margin:0 0 1em 0;}#yiv8585438185 #yiv8585438185ygrp-text tt {font-size:120%;}#yiv8585438185 #yiv8585438185ygrp-vital ul li:last-child {border-right:none !important;}#yiv8585438185