Click here to Skip to main content
15,910,877 members
Home / Discussions / C#
   

C#

 
QuestionUploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 1:25
Reddy Prakash14-Nov-07 1:25 
AnswerRe: Uploading Excell file to FTP Pin
Giorgi Dalakishvili14-Nov-07 1:29
mentorGiorgi Dalakishvili14-Nov-07 1:29 
GeneralRe: Uploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 1:48
Reddy Prakash14-Nov-07 1:48 
AnswerRe: Uploading Excell file to FTP Pin
Guffa14-Nov-07 3:43
Guffa14-Nov-07 3:43 
GeneralRe: Uploading Excell file to FTP Pin
Reddy Prakash14-Nov-07 17:01
Reddy Prakash14-Nov-07 17:01 
QuestionHow To Start Service In Setup Application Pin
Boroumandan14-Nov-07 1:13
Boroumandan14-Nov-07 1:13 
AnswerRe: How To Start Service In Setup Application Pin
Abhijit Jana14-Nov-07 1:20
professionalAbhijit Jana14-Nov-07 1:20 
QuestionProblem with invoking new thread with socket parameter Pin
Coyote.Max14-Nov-07 1:09
Coyote.Max14-Nov-07 1:09 
Hi it's my first post on this board, so "hello EveryoneSmile | :) ".

I have a problem with new thread I need for my program. I must create new thread with socket parameter. On this page I found a way to pass a parameter. But this just not work for me.

This is some of my code program. It's lame so please don't mind.

This is a fragment of my new thread:

private static void Thread_Send_Recv(Socket w)<br />
        {<br />
            klient k = new klient();<br />
            string dane;<br />
            byte[] buf = new byte[255];<br />
            while (true)<br />
            {<br />
                try<br />
                {<br />
                    w.Receive(buf);<br />
                    dane = Encoding.UTF8.GetString(buf);<br />
                    string[] split = dane.Split(new Char[] { ',' });<br />
<br />
                    if (split[0].ToString() == "LOGIN")<br />
                    {<br />
                        string n, message;<br />
                        bool all_ok = true;<br />
                        byte[] m = new byte[255];<br />
                     <br />
                        n = split[1].ToString();<br />
<br />
                        ...


And this is thread that invoke previous thread:

private static void Thread_Accept()<br />
        {<br />
            while (true)<br />
            {<br />
                s1 = s.Accept(); <br />
                sockety.Add(s1);<br />
                Console.WriteLine("Wykryto polaczenia z adresem: " + s1.RemoteEndPoint);<br />
                ParameterizedThreadStart pts = new ParameterizedThreadStart(Thread_Send_Recv);<br />
                Thread sr = new Thread(pts);<br />
                sr.Start(s1);<br />
            }<br />
        }


When I try to compile this I get a strange error:

No overload for 'Thread_Send_Recv' matches delegate 'System.Threading.ParameterizedThreadStart

Why is that? I know that Socket isn't exactly a Object in parameters of Thread_Send_Recv but when I change it for an Object, it says that object don't have such methods as Recive(), Send(), etc. How to change it so it can work. Sorry for my bad English;P.

Thanks in advance for any word of helpRoll eyes | :rolleyes:
AnswerRe: Problem with invoking new thread with socket parameter Pin
TJoe14-Nov-07 2:13
TJoe14-Nov-07 2:13 
GeneralRe: Problem with invoking new thread with socket parameter Pin
Coyote.Max14-Nov-07 4:35
Coyote.Max14-Nov-07 4:35 
QuestionParsing strings into TimeSpans Pin
Vikram A Punathambekar14-Nov-07 1:02
Vikram A Punathambekar14-Nov-07 1:02 
AnswerRe: Parsing strings into TimeSpans Pin
Pete O'Hanlon14-Nov-07 2:19
mvePete O'Hanlon14-Nov-07 2:19 
GeneralRe: Parsing strings into TimeSpans Pin
Vikram A Punathambekar14-Nov-07 3:38
Vikram A Punathambekar14-Nov-07 3:38 
QuestionHelp with Data Export Pin
MumbleB14-Nov-07 0:40
MumbleB14-Nov-07 0:40 
AnswerRe: Help with Data Export Pin
Rob Philpott14-Nov-07 2:21
Rob Philpott14-Nov-07 2:21 
GeneralRe: Help with Data Export Pin
MumbleB14-Nov-07 7:57
MumbleB14-Nov-07 7:57 
QuestionHow to start service Pin
Boroumandan14-Nov-07 0:35
Boroumandan14-Nov-07 0:35 
AnswerRe: How to start service Pin
Abhijit Jana14-Nov-07 0:43
professionalAbhijit Jana14-Nov-07 0:43 
GeneralRe: How to start service Pin
Boroumandan14-Nov-07 0:49
Boroumandan14-Nov-07 0:49 
GeneralRe: How to start service Pin
Abhijit Jana14-Nov-07 1:10
professionalAbhijit Jana14-Nov-07 1:10 
QuestionFilecopy in windows service and win application Pin
amitcoder8314-Nov-07 0:34
amitcoder8314-Nov-07 0:34 
AnswerRe: Filecopy in windows service and win application Pin
Boroumandan14-Nov-07 0:39
Boroumandan14-Nov-07 0:39 
GeneralRe: Filecopy in windows service and win application Pin
amitcoder8314-Nov-07 0:44
amitcoder8314-Nov-07 0:44 
AnswerRe: Filecopy in windows service and win application Pin
Vikram A Punathambekar14-Nov-07 1:05
Vikram A Punathambekar14-Nov-07 1:05 
GeneralRe: Filecopy in windows service and win application Pin
amitcoder8314-Nov-07 1:53
amitcoder8314-Nov-07 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.