-
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)
-
Re: need some advice..
You need to make sure your TCPClient is connected to a remote host first.
-
Re: need some advice..
hmm the connection is already connected, still the message cannot send out to the server. my server is using java
-
Re: need some advice..
Could you use winsock to communicate instead? Or can winsock only communicate with another winsock?
-
Re: need some advice..
hmm sorry what is winsock? i just started learning Vb.net still very new to the VB.net
-
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.