Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 588
  • Last Modified:

VB.net String Encoding

Hi,

I'm creating a vb.net client/server program which uses tcp sockets.

The socket.send command takes a byte array so i need to use Encoding.getbytes to convert strings for sending.

I want the server to be available for clients to use as an API so I want it to be as simple as possible, as if it was a telnet server which is very easy to connect to and communicate with.

I need to ensure the end users encode their strings correctly and that I can automatically decode them regardless of the encoding method that the client uses. What type of string encoding do telnet servers use?

Is there a better way of doing this?

Thanks
Dan
0
DanJourno
Asked:
DanJourno
  • 4
1 Solution
 
Wayne MichaelSenior Software DeveloperCommented:
I think you should look at .net remoting.

Ill see if I can find a link.
0
 
Wayne MichaelSenior Software DeveloperCommented:
Then again maybe it isn't a exact fit.. But here it is.

http://msdn.microsoft.com/en-us/library/kwdt6w2k(v=vs.71).aspx

Json might be worth checking out.
0
 
DanJournoAuthor Commented:
No. Its not suitable because some client may not be using .net.
Are there any free Telnet server components for .net? Or if not, any paid ones?
0
 
Wayne MichaelSenior Software DeveloperCommented:
Did you look at this?

http://social.msdn.microsoft.com/Forums/en-US/ncl/thread/2f227b3e-f867-46b2-b0a3-a30cbee958ae/


With it being a telnet type interface perhaps a require needs to be sending some sort of encoding parameter in UTF8 at first to clear up that issue.  It will be impossible for the server to know what type of encoding it is seeing I suspect.

Might be worth googling auto detect encoding.
0
 
Wayne MichaelSenior Software DeveloperCommented:
I found this:

http://stackoverflow.com/questions/3746530/auto-encoding-detect-in-c-sharp

I haven't actually done this but I would think it would convert to vb.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now