andys987

andys987

  • NA
  • 1
  • 0

Sockets to connect to Unix box?

Sep 30 2004 10:01 AM
I am trying to build an app that can read files from a Unix box (the app will run on windows). I have been working with Sockets to try and make it work. I can get connected, but the data that I receive is not readable and not what I expected. So even though I am technically connected, I can't even get to username/password input. I am using asynchronous non-blocking methods for receiving data but I still get fewer bytes than expected. I have the same problem when I test connections to either Unix or Windows servers. The only time it works correctly is when I connect to an application that I wrote that accepts connections. Then I can send text back and forth. I have tried using several decoding variations but none work: System.Text.Encoding.UTF8.GetDecoder(); System.Text.Encoding.ASCII.GetDecoder(); System.Text.Encoding.Unicode.GetDecoder(); The text I reveive looks like this: ?8??C? or ?E??#??? Are my expectations wrong? I was hoping to see the same text I see as when I use Telnet to connect to the server. PLEASE HELP!