Register for your free account! | Forgot your password?

You last visited: Today at 03:50

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

Advertisement



Couple of Questions

Discussion on Couple of Questions within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Couple of Questions

im studying Socket atm and got 2 questions to ask :-

1st : i know that there r 2 types of sockets Async which doesnt block the main thread from working and the other type is Sync which does .. so my question is why would i use smthing that block the main thread while i can use the same one without blocking ? in other way when should i use Sync Socket

2nd : when i make Server / Client should i code them both in the same Projects Or i can do each of them in Separate ones ?

thx in Advance
Regards
Shadowman123
shadowman123 is offline  
Old 01/26/2013, 16:42   #2
 
elite*gold: 0
Join Date: Jan 2013
Posts: 40
Received Thanks: 29
ShittyMod is offline  
Thanks
1 User
Old 01/26/2013, 16:43   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
and for the 2nd question ?
shadowman123 is offline  
Old 01/26/2013, 16:46   #4
 
elite*gold: 0
Join Date: Jan 2013
Posts: 40
Received Thanks: 29
Quote:
Originally Posted by shadowman123 View Post
and for the 2nd question ?
That doesn't really matter. It's probably more convenient to have both the server and the client project in one solution since you can easily browse between the two when doing changes.
ShittyMod is offline  
Old 01/26/2013, 16:55   #5
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
1. Always use async whenever possible in the end it will make your performance better because with sync sockets you actually do not have so much control on the end as you may think, so you can't really optimize them and same goes with async sockets, but you don't need much more control for them actually. If you handle a single connection only then syunc sockets can be fine, but with multiple connections always use async.

2. I assume you're using Visual Studio. Your solution can have multiple projects, use seperate projects, because a client and a server is not the same thing and only thing they might share is the socket library, so what you can do is making 3 projects. A library project and then 2 projects for your client and server.
Super Aids is offline  
Old 01/26/2013, 19:43   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
How you organize your projects is personal preference for the most part but it's best to consider how related things are.


For example... should the client contain the server?... no, that would make no sense to do. As such they should generally be different projects (can be part of the same solution. That makes no real difference besides how you view things inside visual studio).


You do get into more complex things though. For example game and login server. There's no good reason why they cannot be the same project but most people will seperate them for a few reasons.

#1: Scalability: If you ever had the need, you could run the login server and game servers on different hosts. Also allows for multiple game servers with one login server, etc.

#2: Redundancy. If your login server fails, you don't really want it to take the game server with it and vice versa. You could have the login server ensure that the game server is running/responding before forwarding the connection (if not give a user friendly error message) as well as many other things.



As already mentioned, it's often times handy to write a library for your more commonly used systems such as your network system, database setup and many other things that you may wish to use in more than one project.
pro4never is offline  
Thanks
1 User
Old 01/27/2013, 01:11   #7
 
elite*gold: 0
Join Date: Jan 2013
Posts: 1
Received Thanks: 0
alguno conose a CALIPSOGAMERS¿
PERROSKI is offline  
Old 01/28/2013, 10:35   #8
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
@Server layout

Also host the database on another server, that way each auth server could always authenticate from the same db.
Super Aids is offline  
Thanks
1 User
Old 01/28/2013, 19:47   #9
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
well i'd like to Login Panel which the user have to Enter his Conquer Account and password if they r wrong he wont get it if its the name of character he Entered will be added to Member List .. any1 know how to make it ( Mechanism )
shadowman123 is offline  
Old 01/29/2013, 08:34   #10
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
A simple sql query like "select * from accounts where username = 'uisernamehere' and password = 'password'".

Remember don't use the code above directly as it will leave it open to sql injection.

Uhmm but you get it.
Super Aids is offline  
Reply


Similar Threads Similar Threads
A couple questions.
05/09/2010 - EO PServer Hosting - 17 Replies
How come when i edit my cq_user in my navicat and relog in on my account it says "Server interruption. Please log in later" How do i add stars to any of my pets in the navicat? How do i add eps to my character in th navicat? Where can i get a good schopping mall, like in any other server, mine has not many things i got problley 8 pets, and 5 pages, 2 pages are filled with eudcards how do i get +255 gears with +255 elemnts 2 socket and gems for warrior in my server? and for the...
[HELP]Just a couple of questions
05/21/2009 - CO2 Private Server - 5 Replies
what is a static ip and how do i get one? if i made a new item fo rmy server does the image have to be saved as dds? How ot make a Gold cup? like whats the UID for talismans? More to come*
Couple of questions
09/04/2008 - Silkroad Online - 4 Replies
Hello everyone, I'm new to sro, just started yesterday and have a couple of questions, I hope you guys can help me. 1.- How are sp spend? I've been reading about sp farming so I haven't used a single sp. Right now my char is lvl 10 and have 310 sp and now I wanna add a skill. What I don't understand is, do I spend one for each mastery level?, or I can click 'Level up' anytime for free and the sp are spend when I level the skills. 2.- When they say Xlvl gap, it means the difference...
A couple of questions
11/18/2007 - Conquer Online 2 - 1 Replies
hey can someone answer a few questions for me please? thanks :) 1.What is the fastest way to get alot of dbs? 2.How can i get back my warehouse passwrod, i forgot it. Thanks in Advance :)
Couple of questions
01/20/2006 - Conquer Online 2 - 0 Replies
Are the memory address the same in CO2 for Stam, HP and Mana as they where in CO1.0? If not what are they, or do I have to fiund them myself >:o ? Has anyone found a way to find a player on the current screen (as in mouse co-ords)? Reason I ask is cause I am thinking of writing an app for my Miner, so when he gets PKed, it logs in my water and revs him, closes the client my water is logged into then continues mining on my Miner client. I could do it with a set mouse position, but then...



All times are GMT +1. The time now is 03:51.


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