views:

40

answers:

1
+3  A: 

Yes, Stream.ReadByte() will block until either:

  • The stream is closed (in which case -1 is returned)
  • Data is received on the stream, in which case the next byte will be returned

So presumably the server you're connecting to isn't sending any data... it may well be waiting for more data from you. How convinced are you that your login command is being sent properly? Have you flushed the stream you're writing on? Sent any delimiters or line terminators that are required?

Jon Skeet
ooops I think I have no line terminators at all
alex
yes that was it! thanks
alex