Click here to Skip to main content
15,889,867 members
Home / Discussions / C#
   

C#

 
QuestionRunning a command on remote pc Pin
CodingYoshi31-Oct-09 15:32
CodingYoshi31-Oct-09 15:32 
AnswerRe: Running a command on remote pc Pin
Wes Aday31-Oct-09 18:11
professionalWes Aday31-Oct-09 18:11 
QuestionVoice streaming using C# Pin
tobibabs31-Oct-09 13:52
tobibabs31-Oct-09 13:52 
AnswerRe: Voice streaming using C# Pin
Mycroft Holmes31-Oct-09 22:00
professionalMycroft Holmes31-Oct-09 22:00 
QuestionAsync TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
Chesnokov Yuriy31-Oct-09 10:49
professionalChesnokov Yuriy31-Oct-09 10:49 
AnswerRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
N a v a n e e t h31-Oct-09 18:22
N a v a n e e t h31-Oct-09 18:22 
QuestionRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
Chesnokov Yuriy31-Oct-09 20:06
professionalChesnokov Yuriy31-Oct-09 20:06 
AnswerRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
N a v a n e e t h31-Oct-09 21:57
N a v a n e e t h31-Oct-09 21:57 
It looks like you are new to network programming. I'd suggest to stay away from asynchronous methods for now. Spawn new threads or use ThreadPool to do the work. Once you feel comfortable with that design, try for asynchronous method. Manually creating threads and using it for handling connections and messages works well. You need asynchronous methods only when you need high scalability.

That said, there is no method to stop the asynchronous call especially when the call involves unmanaged code execution. A call to EndAccept will not help as it waits until the operation completes.

Chesnokov Yuriy wrote:
Are there better ways to work with Socket class instead of that Tcp abstraction?


It depends on what you are doing. If you are doing for learning, TcpListener and TcpClient should be enough. For any serious network programming work with Socket class directly. This[^] MSDN article may help you.

Best wishes,
Navaneeth

GeneralRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? [modified] Pin
Chesnokov Yuriy31-Oct-09 23:36
professionalChesnokov Yuriy31-Oct-09 23:36 
QuestionRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
Chesnokov Yuriy1-Nov-09 0:56
professionalChesnokov Yuriy1-Nov-09 0:56 
AnswerRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
N a v a n e e t h1-Nov-09 1:32
N a v a n e e t h1-Nov-09 1:32 
AnswerRe: Async TcpListener recieves ClientAccept after stoping listening. How to notify it that the client disconnected? Pin
Chesnokov Yuriy1-Nov-09 2:35
professionalChesnokov Yuriy1-Nov-09 2:35 
QuestionTcpClient does not get disconnected? Pin
Chesnokov Yuriy31-Oct-09 10:37
professionalChesnokov Yuriy31-Oct-09 10:37 
AnswerRe: TcpClient does not get disconnected? Pin
N a v a n e e t h31-Oct-09 18:20
N a v a n e e t h31-Oct-09 18:20 
QuestionRe: TcpClient does not get disconnected? Pin
Chesnokov Yuriy31-Oct-09 19:59
professionalChesnokov Yuriy31-Oct-09 19:59 
AnswerRe: TcpClient does not get disconnected? Pin
N a v a n e e t h31-Oct-09 21:45
N a v a n e e t h31-Oct-09 21:45 
QuestionDrawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
lexical131-Oct-09 7:47
lexical131-Oct-09 7:47 
AnswerRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. [modified] Pin
0x3c031-Oct-09 8:02
0x3c031-Oct-09 8:02 
GeneralRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
Richard MacCutchan31-Oct-09 10:47
mveRichard MacCutchan31-Oct-09 10:47 
GeneralRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
0x3c031-Oct-09 21:40
0x3c031-Oct-09 21:40 
GeneralRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
Richard MacCutchan31-Oct-09 21:53
mveRichard MacCutchan31-Oct-09 21:53 
AnswerRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
Luc Pattyn31-Oct-09 8:17
sitebuilderLuc Pattyn31-Oct-09 8:17 
GeneralRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
lexical131-Oct-09 19:37
lexical131-Oct-09 19:37 
GeneralRe: Drawing/Graphics in C#: Draw shapes like rectangle & triangle when respective radio button is checked. Pin
Luc Pattyn1-Nov-09 0:26
sitebuilderLuc Pattyn1-Nov-09 0:26 
Questionquestion Pin
anooshe31-Oct-09 7:45
anooshe31-Oct-09 7:45 

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.