Solved

VB.net String Encoding

Posted on 2013-06-02
5
550 Views
Last Modified: 2013-06-03
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
Comment
Question by:DanJourno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 11

Expert Comment

by:wrmichael
ID: 39215096
I think you should look at .net remoting.

Ill see if I can find a link.
0
 
LVL 11

Expert Comment

by:wrmichael
ID: 39215100
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
 
LVL 5

Author Comment

by:DanJourno
ID: 39215465
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
 
LVL 11

Accepted Solution

by:
wrmichael earned 500 total points
ID: 39215755
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
 
LVL 11

Expert Comment

by:wrmichael
ID: 39215951
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question