Results 1 to 6 of 6

Thread: need some advice..

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    55

    Resolved need some advice..

    got problem with my code,i am trying to send my text to my java sever but a error message come out : An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll. i try alot of method but still i encounter a problem...

    Dim msg As String = Txtinput.Text
    Dim netStream As NetworkStream = client.GetStream() <---- this line got problem
    Dim encoder As ASCIIEncoding
    Dim buffArray() As Byte = encoder.GetBytes(msg)
    netStream.Write(buffArray, 0, buffArray.Length)
    Last edited by longdexin; Jul 19th, 2005 at 09:49 PM.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: need some advice..

    You need to make sure your TCPClient is connected to a remote host first.

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    55

    Re: need some advice..

    hmm the connection is already connected, still the message cannot send out to the server. my server is using java

  4. #4
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: need some advice..

    Could you use winsock to communicate instead? Or can winsock only communicate with another winsock?

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    55

    Re: need some advice..

    hmm sorry what is winsock? i just started learning Vb.net still very new to the VB.net

  6. #6
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: need some advice..

    Winsock is used for server/client programs to send data to one another. When you say java server, you talking about chat server in java? I'm not sure if it has to be a vb server for it to work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width