|
-
Jul 14th, 2005, 02:34 AM
#1
Thread Starter
Member
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.
-
Jul 14th, 2005, 03:40 AM
#2
Re: need some advice..
You need to make sure your TCPClient is connected to a remote host first.
-
Jul 14th, 2005, 09:59 PM
#3
Thread Starter
Member
Re: need some advice..
hmm the connection is already connected, still the message cannot send out to the server. my server is using java
-
Jul 15th, 2005, 06:24 PM
#4
Frenzied Member
Re: need some advice..
Could you use winsock to communicate instead? Or can winsock only communicate with another winsock?
-
Jul 15th, 2005, 09:11 PM
#5
Thread Starter
Member
Re: need some advice..
hmm sorry what is winsock? i just started learning Vb.net still very new to the VB.net
-
Jul 18th, 2005, 12:03 PM
#6
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|