Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 22:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Socket Connection VB.NET

Discussion on Socket Connection VB.NET within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2011
Posts: 11
Received Thanks: 0
Socket Connection VB.NET

Hello, i'm trying to connect my software at metin2's server, with socket connection.
But I do not know when i err..
This is the code:
Code:
Dim query As String = "@SHOWMETHEMONEY.@EVENT TEST 1."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("5.100.136.100", host) Then
                MessageBox.Show("This IP is not valid")
                Exit Sub
            End If

            Dim ep As IPEndPoint = New IPEndPoint(host, Integer.Parse(30000))
            mySock = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

            mySock.Connect(ep)

            If mySock.Connected Then

                mySock.Send(Encoding.ASCII.GetBytes(query))

                MsgBox("Sended!")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
Everything works perfectly, the connection is made, I receive the message "sended", but i have not consequences ingame.

Can you help me?

Up!
-Legor- is offline  
Reply

Tags
connection, metin2, socket, tcp, visualbasic




All times are GMT +2. The time now is 22:29.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.