[Stk] UdpSocket

Scholten, Dan djscholten@mitre.org
Tue, 2 Jan 2007 08:12:08 -0500


This is a multi-part message in MIME format.

------_=_NextPart_001_01C72E6F.9B994792
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I'm using the UdpSocket class from the STK and had a question on the
readBuffer function.  I want to call this method from a callback that
runs on a set time interval (say every 30 seconds), but I'm not
guaranteed to have received data since the last readBuffer call was
made.  It seems that this method will block until data is received
before continuing.  I wish the program to just continue execution
regardless if any data was received or not.  Is there a precheck I can
make to see if the socket has received any data or a way to make the
readBuffer call "timeout" if it does not receive data within a certain
time frame?
=20
Thanks,
Dan Scholten

------_=_NextPart_001_01C72E6F.9B994792
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR></HEAD>
<BODY>
<DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D038190916-27122006>I'm =
using&nbsp;<SPAN=20
class=3D742171113-02012007>the </SPAN>UdpSocket class from the STK and =
had a=20
question on the readBuffer function.&nbsp; I want to call this method =
from a=20
callback that runs on a set time interval (say every 30 seconds), but =
I'm not=20
guaranteed to have received data since the last readBuffer call was =
made.&nbsp;=20
It seems that this method will block until data is received before=20
continuing.&nbsp; I wish the program to just continue execution =
regardless if=20
any data was received or not.&nbsp; Is there a precheck I can make to =
see if the=20
socket has received any data or a way to make the readBuffer call =
"timeout" if=20
it does not receive data within a certain time =
frame?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D038190916-27122006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D038190916-27122006>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D038190916-27122006>Dan=20
Scholten</SPAN></FONT></DIV></DIV></BODY></HTML>

------_=_NextPart_001_01C72E6F.9B994792--