Register for your free account! | Forgot your password?

Go Back   elitepvpers > Silkroad Online > SRO Coding Corner
You last visited: Today at 18:58

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


C# need some help to send packets

Old   #1
elite*gold: 0
Join Date: Dec 2014
Posts: 7
Received Thanks: 0
C# need some help to send packets

Hello, anyone can help me with small example, how can i send packets to the server?

x1stvanx is online now  
Old   #2
elite*gold: 0
Join Date: Sep 2017
Posts: 40
Received Thanks: 3
string message = "Hey everyone, test test";
            Packet send_all = new Packet(0x7025);
This one sends chat to all players, (all) chat... its that simple ^^

#HB is offline  
1 User
Old   #3
elite*gold: 0
Join Date: Dec 2014
Posts: 7
Received Thanks: 0
And how can i connect my client to the server and send this packet? i know only Silkroad is using TCP, but no more.
x1stvanx is online now  
Old   #4

elite*gold: 371
Join Date: Dec 2013
Posts: 779
Received Thanks: 550
you should connect to the server first using tcp client or socket what ever you need
and with ssa you could send packets

KingDollar is online now  
Old   #5
elite*gold: 0
Join Date: Dec 2014
Posts: 7
Received Thanks: 0
I found this code in older thread:


private static SimpleSilkroadClient client;
private static Thread thSessionUpdater;

        static void Main(string[] args)
            Console.Title = "SampleClient";

            client = new SimpleSilkroadClient();
            client.OnCommandReceived += Client_OnCommandReceived;
            client.Connect("", 39000);

            thSessionUpdater = new Thread(ThreadedSessionUpdating);

            Console.WriteLine("Press any key to exit...");

        private static void ThreadedSessionUpdating()
            while (true)
                if (client != null)

        private static void Client_OnCommandReceived(Packet packet)
            //PACKET HANDLING
            if (packet.Opcode == 0x1234) //SAMPLE OPCODE
                string message = packet.ReadAscii();

                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Message: {0}", message);

                Packet sampleResponse = new Packet(0x1234);
                sampleResponse.WriteAscii("Hello. It's nice being connected to you :)");

if i put the gameserver ip and port this will connect to it?

x1stvanx is online now  

« Previous Thread | Next Thread »

Similar Threads
[Release] +5500 Packets structure , client/packets constants
edit : if u know nothing about packets go to this post first explaining what is packets , and explaining a packet with details and everything...
10 Replies - CO2 PServer Guides & Releases
Packets packets packets...
I have been struggling to understand what is a Packet how could i create one with the data i want then send it to my server So please any one tell...
13 Replies - CO2 PServer - Discussions / Questions
[REQUEST] packets send list , or anyway to sniff send packets
hey everyone , as mentioned , i wanna know if anyone got a complete send packets lists or anyway i can sniff send packets , thanks in advance
16 Replies - Kal Online
[Packets] Wie änder ich flyff packets?
HeyHo, Ich würde sehr gerne wissen wie man die Flyff Packets ändert... ich denke mal Zahlen ändern werden nicht ausreichen oder?
19 Replies - Flyff PServer - Discussions / Questions
[Q] Need Help Send Mixed Packets
Hello guys, i just wan'ted to ask can any 1 tell me how to send Mix Packets to server? If yes how? will be realy helpfull thanks for help
24 Replies - Kal Online

All times are GMT +1. The time now is 18:58.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.