Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
tcp reader
SUBMITTED BY:
Thor2607
DATE:
Sept. 29, 2016, 3:12 a.m.
FORMAT:
C#
SIZE:
469 Bytes
Raw
Download
Tweet
HITS:
664
Go to comments
Report
private
void
as_read
()
{
BinaryReader
br
=
new
BinaryReader
(
ns
);
while
(
ns
.
CanRead
)
{
while
(
!
ns
.
DataAvailable
)
System
.
Threading
.
Thread
.
Sleep
(
33
);
if
(
!
ns
.
CanRead
)
return
;
int
l
=
br
.
ReadInt32
();
byte
[]
buffer
=
new
byte
[
l
];
ns
.
Read
(
buffer
,
0
,
l
);
if
(
receive
!=
null
)
receive
(
buffer
);
}
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus