Visual basic sockets
Posted on 2003-02-23
I dont know anything about VB programming, so I apologize in advance if something sounds wrong.
I have a friend that is writting a client in VB, and I am writing the server in java. We are having a tough time getting the client and server to talk to each other. For some reason, whenever his client sends text to the server, the server receives weird unicode characters in the streams.
For instance if he sends "Client says hello", the server might receive "(clover symbol) Client(diamond) says(clover symbol) hello". He tells me he is sending a pure ascii string, so what gives?
This is a piece of the code he is using to connect:
wsck1.LocalPort = Rnd(3000) + 1000
wsck1.Connect wsck1.RemoteHost, wsck1.RemotePort
If someone could post some sample code that would simply connect to a socket on a certain port, and send a line of text and listen for a response - that would be great.
I hope I have provided enough info for someone to help me here. Thanks a lot for your time.