需要像此客户端这样的TCP服务器 [英] Need TCP Server Like This Client Please

查看:61
本文介绍了需要像此客户端这样的TCP服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Imports EasyTCPLib.Managed
Public Class Form1
    Private WithEvents cl As New ManagedClient
    Dim nick As String

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nick = InputBox("Please Enter Your Nick Name!", "Chatting Team Friends", "Guest" + New Random().Next(1, 20000).ToString)
        cl.Connect("127.0.0.1", 8000)
        Control.CheckForIllegalCrossThreadCalls = False

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cl.Send(nick + "|-" + Textbox1.Text)
        Textbox1.Text = ""
    End Sub
    Dim html As String = My.Settings.Setting1
    Private Sub cl_DataRecevied(ByVal sender As Object, ByVal e As EasyTCPLib.Managed.DataReceivedArgs) Handles cl.DataReceived
        Dim txt As String = e.Value.ToString
        Dim txt1 As String = txt.Substring(txt.IndexOf("|-") + 2)
        Dim txt2 As String = txt.Split("|-")(0)
        For Each i As String In My.Computer.FileSystem.ReadAllText("Config/emot.ini").Split(vbNewLine)
            Try
                Dim htimg As String = My.Resources.String2 + Application.StartupPath + "/Emoticons/" + i.Split("-")(1).Replace(Chr(10), "").Replace(Chr(13), "") + My.Resources.String3
                txt1 = txt1.Replace(i.Split("-")(0).Replace(Chr(10), ""), htimg)
            Catch ex As Exception
            End Try
        Next
        html += "<font color="#00C000">" + txt2 + "</font>" + "-" + txt1 + "<br>"
        WebBrowser1.DocumentText = html
    End Sub


如果有人需要帮助,我需要紧急帮助我等待任何帮助.


If Any One Have Help I Need That Rly Im Waiting Any Help

推荐答案

我会为您完成此操作.当您要某人为您工作时,我的费用是每小时
I''ll do this for you. As you''re asking for someone to do your work for you, my rate is


80.请与我联系以获取更多详细信息,我会在头10个小时内要求您支付押金,用完后,您可以再次向我付款.
80 an hour. Contact me for more details, I''ll want a deposit for the first 10 hours and when you''ve used them up, you can pay me again.


嘿,这只是服务器像在此客户端中一样的1分钟相同代码,不是很困难
Hey Its Just Server Take 1 Min Same Code Like In This Client its Not HardWay


这篇关于需要像此客户端这样的TCP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆