Register for your free account! | Forgot your password?

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

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

Advertisement



[VB.Net] Metin2 RCon (Socket Connection)

Discussion on [VB.Net] Metin2 RCon (Socket Connection) within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
JachuPL's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
[VB.Net] Metin2 RCon (Socket Connection)

Hi I'm trying to create a socket connection to my server, but there's something that does not work. Connection works fine, no error achieved but no reaction for the commands. Anybody could help? Thanks in advance, MfG

Code:
Dim query As String = "@SHOWMETHEMONEY.@EVENT TEST 1."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("192.168.1.102", 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
bumping thread, nobody knows the answer?
JachuPL is offline  
Old 11/16/2013, 20:26   #2
 
JachuPL's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
bump, somebody help please
JachuPL is offline  
Old 11/16/2013, 20:36   #3
 
Jоe's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 749
Received Thanks: 188
xD Did you really think, that those commands would further work as String signs?
You lol'd my day!
Jоe is offline  
Old 11/16/2013, 20:46   #4
 
JachuPL's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
Quote:
Originally Posted by Jоe View Post
xD Did you really think, that those commands would further work as String signs?
You lol'd my day!

so how am i supposed to send them?
JachuPL is offline  
Old 11/16/2013, 20:59   #5
 
Jоe's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 749
Received Thanks: 188
hex rays.
Jоe is offline  
Old 11/17/2013, 00:09   #6
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
Quote:
Originally Posted by Jоe View Post
xD Did you really think, that those commands would further work as String signs?
You lol'd my day!
Quote:
Originally Posted by Jоe View Post
hex rays.
You just failed

Quote:
Originally Posted by JachuPL View Post
Hi I'm trying to create a socket connection to my server, but there's something that does not work. Connection works fine, no error achieved but no reaction for the commands. Anybody could help? Thanks in advance, MfG

Code:
Dim query As String = "@SHOWMETHEMONEY.@EVENT TEST 1."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("192.168.1.102", 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
bumping thread, nobody knows the answer?
Try UDP.
Tyrar is offline  
Old 11/17/2013, 05:47   #7
 
Anohros's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 288
Received Thanks: 1,170
Maybe helps you my file attachment. I don't know if it still works, it's from three years ago.

With regards,
Anohros
Attached Files
File Type: zip ServerUI Control.zip (33.2 KB, 77 views)
Anohros is offline  
Thanks
1 User
Old 11/17/2013, 12:58   #8
 
JachuPL's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
Quote:
Originally Posted by Anohros View Post
Maybe helps you my file attachment. I don't know if it still works, it's from three years ago.

With regards,
Anohros
It still works, and fits my need Thank You Very Much and all the best
Kind Regards, JachuPL
JachuPL is offline  
Reply


Similar Threads Similar Threads
socket connection status
08/21/2012 - C/C++ - 2 Replies
und da habe ich wieder ein problem mit den sockets :) ich connecte mit einem nonblocking socket zu einem server. soweit alles gut, wenn ich allerdings vom server getrennt werde, bekomme ich das nicht mit. aktuell versuche ich das so: int r = select(this->m_socket+1,&fdread,&fdwrit e,nullptr,&tv); if(r<=0) return false;
java.net.socket.exception: Connection reset
06/06/2012 - Minecraft - 4 Replies
Hallo . Ich wollt vorhin auf nen server von nem freund und als miecraft verbinden wollte kam erst die meldung "can't reach server" als ich dann trotzdem auf verbinden gedrückt hab kam die meldung aus der überschrift.Weiß jemand woran das liegt vllt an überlastung oder so ?
Socket Connection VB.NET
02/15/2012 - Metin2 Private Server - 0 Replies
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: 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")



All times are GMT +1. The time now is 22:57.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.