Register for your free account! | Forgot your password?

You last visited: Today at 23:11

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

Advertisement



[C#]Async Socket

Discussion on [C#]Async Socket within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2013
Posts: 4
Received Thanks: 2
[C#]Async Socket

Hey ,
this is my first test of coding a socket



Notice : i didn't finished it yet .. i wanted to know ur opinion first
The-Dreamer is offline  
Old 01/09/2014, 14:51   #2
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Good Luck with it.
abdoumatrix is offline  
Old 01/09/2014, 15:59   #3
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Why do you import namespaces that you aren't using Threading, Threading.Tasks, Text, Linq and Collections.Generic?

Also you don't need to do new AsyncCallback(function).
You can just do:
Code:
Socket.BeginAccept(AcceptCallback, null);
^same for BeginReceive etc.
Super Aids is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
A look at async/await and its applications
08/08/2013 - CO2 Programming - 6 Replies
I'm pretty sure most programmers here are still stuck using the legacy async methods (Begin..., End...) instead of the new keywords, so here's a small overview of using them. You can quickly see how applicable they are to development and how useful it can be. Emphasis on "small overview". It also becomes extremely apparent how much cleaner your code becomes using async/await rather than the legacy methods which forced you to write spaghetti-like code.
[Release]Async Sockets (No packet-splitter)
09/20/2012 - CO2 Programming - 16 Replies
So after seeing this thread: http://www.elitepvpers.com/forum/co2-pserver-discu ssions-questions/2129268-problem-packet-splitting. html I thought I'd make some socket server that could handle the packets without needing to split. Source: BasicClient.cs using System;
Async Socket Wrapper
11/11/2011 - CO2 Programming - 8 Replies
So I was bored and thought I would code a socket wrapper. It's a class library, but full project is available for download + an example use for a socket server. It contains both wrapper for server and client stuff, which means it can be used for either private servers as server-socket or for a proxy. WinAsync - This class contains all the events. public delegate void WinEvent(WinClient wClient); public delegate void WinBufferEvent(WinClient wClient, WinBuffer Buffer); ...



All times are GMT +2. The time now is 23:11.


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.