T
Tomasz Naumowicz
Hello Everybody,
I have the following problem with Socket:
Socket.Available reports data in the buffer (e.g. 1849 bytes) but I can't
read it because Socket.Read throws an exception
The exception ist being thrown because the connection is already closed. How
could I read the data from the buffer?
background information:
I open multiple connections to my Windows 2003 Web Server (simple HTTP GET).
pseudocode:
while (true) {
foreach open socket {
if should read
read
if should write
write
}
if new connection needed
create new connection
}
The IIS sends the data and closes the connection imediatelly. Sometimes my
application is not ready to "read" because it's doing something else at the
moment.
Shouldn't I be able to access the buffer even if the connection is closed by
the server?
Thanks!
tomek
I have the following problem with Socket:
Socket.Available reports data in the buffer (e.g. 1849 bytes) but I can't
read it because Socket.Read throws an exception
The exception ist being thrown because the connection is already closed. How
could I read the data from the buffer?
background information:
I open multiple connections to my Windows 2003 Web Server (simple HTTP GET).
pseudocode:
while (true) {
foreach open socket {
if should read
read
if should write
write
}
if new connection needed
create new connection
}
The IIS sends the data and closes the connection imediatelly. Sometimes my
application is not ready to "read" because it's doing something else at the
moment.
Shouldn't I be able to access the buffer even if the connection is closed by
the server?
Thanks!
tomek