Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 17:34

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

Advertisement



[Guide] Asynchronous Socket Server [For Development Purpose]

Discussion on [Guide] Asynchronous Socket Server [For Development Purpose] within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Danial Eugen's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 171
Received Thanks: 68
[Guide] Asynchronous Socket Server [For Development Purpose]

Hello Guys!

Let's begin our guide.


I. Purpose

The purpose of this tutorial is covering the following aspects

• What is the Asynchronous Calls ?.
• What is the difference between Synchronous and Asynchronous code ?.
• What is the Socket class ?.
• How to create a simple Socket Server for Conquer developing.



II. Requirements

This guide is written as a beginner guide; However, It is expected that you have a basic knowledge of C# and a working brain.

In order to be able to follow along, you will need:

• Brain.exe
• Microsoft Visual Studio 2008 or later (or equivalent)
• Will to learn



III. Explanations

I will start to explain what i was talking about previously so let's take

What is the Asynchronous Calls ?

•Simply Asynchronous(Non-Blocking) calls are made, but we don't have to wait for them to complete; therefore, the program can resume to the next function without suspending the execution .

What is the difference between Synchronous and Asynchronous code ?

•Unlike Asynchronous Calls, Synchronous(Blocking) program is executed line by line. Each time a function is called, program execution waits until that function returns before continuing to the next line of code.

So we can conclude that using an Asynchronous Call, We can prevent program freeze while doing some Time-Consuming functions.

What is the Socket class ?

•The Socket class allows you to perform both synchronous and asynchronous data transfer between clients and servers.


IV. Implementation

Now we are ready to get started. The first thing we will be doing is creating a new Console Application File->New->Project and giving it any name Ex. Asynchronous Socket Server

-Create a new class and give it a name, i will name mine Socket.cs

V. Conclusion

In the end, you should have learned how to create a socket for your server development also you know what is asynchronous calls and how to use them; However, this guide is just a first step to socket programming.

NOTE :
●If you want to download the solution and test it yourself, you will find it in the attachment.
●Feel free to correct me if i failed to explain something (This is my first tutorial so i may be explained something wrong).
●Also ask any question here and i will be helping you as far as i can...

Best regards.

Danial Eugen
.
Attached Files
File Type: zip AsynchronousSocket.zip (41.3 KB, 41 views)
Danial Eugen is offline  
Thanks
8 Users
Old 09/17/2012, 20:45   #2
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
This belongs in the programming forum and holy **** VS 2012 is ugly as ****.
I don't have a username is offline  
Thanks
2 Users
Old 09/17/2012, 20:54   #3
 
Arco.'s Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 170
I'm sticking with 2010. It's preeeetty.
Arco. is offline  
Thanks
2 Users
Old 09/17/2012, 21:03   #4
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Quote:
Originally Posted by Arco. View Post
I'm sticking with 2010. It's preeeetty.
Same, I'll never go with 2012
I don't have a username is offline  
Old 09/17/2012, 21:53   #5
 
Danial Eugen's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 171
Received Thanks: 68
Quote:
Originally Posted by I don't have a username View Post
This belongs in the programming forum and holy **** VS 2012 is ugly as ****.
I find Visual Studio 2012 with .NET 4.5 APIs for asynchronous development very satisfying, btw you still can use 2008~2010 for this tutorial anyway i hope you liked my very first topic here.
Danial Eugen is offline  
Old 09/17/2012, 21:58   #6
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Quote:
Originally Posted by Danial Eugen View Post
I find Visual Studio 2012 with .NET 4.5 APIs for asynchronous development very satisfying, But you still can use 2008~2010 for this tutorial anyway i hope you liked my very first topic here.
I just want to point out that you didn't even use anything that isn't available all the way down to 3,5.

Thought you could've used this then.


And sure this is going to be useful for some
I don't have a username is offline  
Thanks
1 User
Old 09/17/2012, 22:03   #7
 
Danial Eugen's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 171
Received Thanks: 68
Quote:
Originally Posted by I don't have a username View Post
I just want to point out that you didn't even use anything that isn't available all the way down to 3,5.

Thought you could've used this then.


And sure this is going to be useful for some
I was just speaking about VS2012 benefit for my personal work;However, this is a beginner's guide and i wanted it to work with the big portion of people who still have 2005~2010 VSs
Danial Eugen is offline  
Old 09/17/2012, 22:20   #8
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
ofc this thread will help a lot of ppl good luck.


#Request sticky this will be very useful at any server development.
badguy4you is offline  
Thanks
2 Users
Old 09/17/2012, 22:46   #9
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
I might not agree with the way it's implemented, and I definitely don't agree with it being stickied, but it's a good guide for an introduction to managing a game server. I can tell you put a lot of time and work into this post, and hopefully it'll be there for anyone searching for something like this. Good job.
Spirited is offline  
Thanks
1 User
Old 09/17/2012, 23:18   #10
 
Danial Eugen's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 171
Received Thanks: 68
Quote:
Originally Posted by Fаng View Post
I might not agree with the way it's implemented, and I definitely don't agree with it being stickied, but it's a good guide for an introduction to managing a game server. I can tell you put a lot of time and work into this post, and hopefully it'll be there for anyone searching for something like this. Good job.
As i told before i kept everything clear and simple because this is not a pro guide

And thanks for your comment.
Danial Eugen is offline  
Thanks
2 Users
Old 09/18/2012, 10:03   #11


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
I did a search and was unable to find 'Brain.exe' could you provide some sort of link or download?

In all seriousness a very nice guide into the topic, well laid out and easy to understand. I dont think a sticky for this is necessary though perhaps if you do a large collection of guides then one sticky could contain links to them all.

Also i love the 2012 design, whats wrong with you guys, embrace metro style apps ffs lol (this isnt a metro app, but is themed like one)
Korvacs is offline  
Thanks
2 Users
Old 09/18/2012, 17:46   #12
 
Danial Eugen's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 171
Received Thanks: 68
Quote:
Originally Posted by Korvacs View Post
I did a search and was unable to find 'Brain.exe' could you provide some sort of link or download?

In all seriousness a very nice guide into the topic, well laid out and easy to understand. I dont think a sticky for this is necessary though perhaps if you do a large collection of guides then one sticky could contain links to them all.

Also i love the 2012 design, whats wrong with you guys, embrace metro style apps ffs lol (this isnt a metro app, but is themed like one)
xDD thank you very much for your nice comment Krovacs and yea you are one of those i appreciate a lot here at EPVP.

And i totally agree with you about VS2012, personally i like its style more than that of 2010.
Danial Eugen is offline  
Old 12/14/2012, 13:41   #13
 
elite*gold: 0
Join Date: Jul 2008
Posts: 112
Received Thanks: 10
Good Job Ma boy
kondos is offline  
Old 12/14/2012, 20:42   #14
 
elite*gold: 0
Join Date: Jun 2012
Posts: 40
Received Thanks: 6
Can't believe i missed this. Thankyou.

Really good tutorial, learnt a couple things i'd looked over.
AudaciousOrange is offline  
Reply


Similar Threads Similar Threads
Asynchronous socket error 10061 - MBOT
05/08/2011 - DarkOrbit - 2 Replies
Good morning, I am user of Mbote hack, but I have a problemprovided thatthe active , after a few hours , I get" Asynchronous socket error10061 " , making it difficult to use the bot , and I lose hours of work and uridium , let me know how to fix this problem. In advance, thank you very much. Pd: Sorry for my bad english.
Guide Fix The Socket Npc In Bird
02/10/2009 - CO2 PServer Guides & Releases - 7 Replies
Thread Closed Beacuse Idiots
COpartner Asynchronous socket error?
05/14/2006 - Conquer Online 2 - 0 Replies
well i DLed COpartner and tried to open it but i get this message "Asynchronous socket error" and i dont know what is wrong, can anyone help? ***still awaiting*** cant bot until this is fixed



All times are GMT +2. The time now is 17:34.


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.