Socket : Error reading from stream

BlitzMax Forums/BlitzMax Programming/Socket : Error reading from stream

Junkprogger(Posted 2006) [#1]
Hi people!

I have an error in my bmx program :

I've written a little server program, based on bmax socket functions. It works good, but sometimes (on my computer : up to 10 connections) the debugger says : Error reading from stream, and it closes my program. I've no idea why it does this, is it a bug ? I've in time the demo of Blitzmax, couse have no money ;)

An other program, was written from a friend, in Bmax too, with Bmax socket functions has the same error! This was a linux app and runs on my server, but only one or two connections and it's closing. Same bug.

Hope you can help me.... (and sry for the bad english, i'm from germany :D (yes i know about blitzforum.de but like to post here ;)


marksibly(Posted 2006) [#2]
Hi,

This sometimes means a stream was closed before an operation has completed.

For instance, if you are trying to read an 'int' from a stream and the stream abruptly closes before 4 bytes are read, you will receive this error.

The error occurs in the form of an exception - you will need to put code inside a Try/Catch block to catch such an exception.