Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 09:11

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

Advertisement



[C#] TCP Multiserver Threading mit Parameter

Discussion on [C#] TCP Multiserver Threading mit Parameter within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1




 
stotterer09's Avatar
 
elite*gold: 26
Join Date: Dec 2010
Posts: 2,628
Received Thanks: 1,816
[C#] TCP Multiserver Threading mit Parameter

Hey ich habe versucht in C# einen Multithreading tcp Ip server zu schreiben.
das Threading ist irgendwie falsch gemacht
ich wollte das eigl. so machen
Code:
				Thread t = new Thread(new ThreadStart(ListenToConnection));
				t.Start(c);// c ist ein Object der Klasse Connection
dann kommt aber der fehler
Keine Überladung für 'ListenToConnection' stimmt mit dem Delegaten 'System.Threading.ThreadStart' überein.

ListentoConnection:
Code:
public static void ListenToConnection (Connection con)
		{

			do {
				try {
					String tmp = con.streamr.ReadLine ();
					Console.WriteLine (con.nick + ":" + tmp);
				} catch {
					liste.Remove (con);
					Console.WriteLine (con.nick + "ist gegangen");
					break;

				}
			} while (true);


		}
aber die Überladung ist doch richtig

mfg
stotterer09 is offline  
Old 06/20/2014, 22:32   #2
 
elite*gold: 0
Join Date: Nov 2010
Posts: 700
Received Thanks: 507
Also ich hab es immer so bei Threads gemacht wenn ich Parameter mit übergeben wollte.


PHP Code:
Thread td = new Thread(() => Recv(id));
td.Start(); 

Ich hoffe das ist das was du wolltest ^^
supercracker13 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Multiserver Odin
08/12/2013 - Fiesta Online - 7 Replies
Hallo es gibt zwar einen Beitrag: http://www.elitepvpers.com/forum/fiesta-online/20 78628-multi-server-f-r-jeden-server-shine.html Multiserver für alte Files aber ich sehe und finde keinen Multiserver für die Odin Files wäre lieb wenn jemand ein TUT machen könnte wie man mit den Odin Files einen Multiserver machen könnte z.B 2 Server in 1 Client /2 Server und 2 Clients Wäre echt lieb und cool :) mfg Kusho
multiserver hack
11/19/2010 - Metin2 - 1 Replies
hi guys i wana know if exist an multi server hack like the one from banjo 1 for metin the one that wass teleport speed and atack hack if exist can any one send me the dowload link plz i cant find it
Multiserver client
09/19/2009 - Metin2 Private Server - 4 Replies
jo hab ne frage ich soll ja was aus dem pack ordner löschen nähmlich locale_honkong und locale_honkong 2 aber es gibt locale_honkong epk und eix und locale_honkong2 epk und eix was soll ich löschen ? bitte um hilfe



All times are GMT +1. The time now is 09:12.


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.