TCPClient和字节 [英] TCPClient And Byte
本文介绍了TCPClient和字节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
Hello,
我正在创建一个需要发送用户名的聊天应用程序(Environment.Username )|我搜索了很多,但我找不到解决方案... -_-
I'm creating a chat application which need to send the user-name (Environment.Username) | I searched a lot but I can't find THE solution... -_-
这是我的代码:
This is my code :
Dim encoding As System.Text.Encoding = System.Text.Encoding.Unicode
Dim bytes As Byte() = encoding.GetBytes(Environment.UserName)
TCPClientz.Client.Send(bytes)
谢谢提前^^
Thanks by advance ^^
希望,y0ga。
Hopefully, y0ga.
推荐答案
你没有显示太多代码。你的客户是否已经联合到了远程端点?您需要具体了解您的程序现在可以执行的操作以及无法发送此特定数据的原因。另请参阅 Tcp
客户端类。
You don't show much code. Is your client coonected to a remote endpoint? You need to be specific on what your program can do now and why you can't send this specific data. Also see Tcp Client Class.
这篇关于TCPClient和字节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文