java - visual basic communication
1 posts in topic
Flat View  Flat View

Posted By:   ken_carey
Posted On:   Tuesday, April 13, 2004 02:47 AM

Hello ,

I have a Java client which connects to a Winsock based VB Server.
I have no problem making a connection. However, when the jaa client sends data the vb server recevices a blank string. Has anyone developed a similar app ?

Would really appreciate the help.


Re: java - visual basic communication

Posted By:   Bill_Scott  
Posted On:   Tuesday, April 13, 2004 07:32 AM

The languages on either side should not matter for connectivity. However, it may affect your protocol (stuff you send back and forth). Look into what you're sending. Is it a binary protocol? If so, do you have byte-ordering issues? If you constructing an ASCII protocol (which I suspect you are because you '...received a blank string...') are you assuming new line terminators? Which ones (Unix or Windows)? If you have an ASCII protocol, it is always best to test things with "telnet".

If you're "sending Strings" from Java using something like a DataOutputStream - be very careful. That encodes the strings. For "character" protocols it is easier just to send ASCII bytes (don't try to match UTF-8 code on either side of the wire. Too many options in Microsoft land).

Of course, your Java Client itself may be broken. How do you know it is sending any data?

About | Sitemap | Contact