Click here to Skip to main content
15,887,214 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionAuto fire method when assembly is loaded Pin
nick_dodd16-Jun-09 0:40
nick_dodd16-Jun-09 0:40 
AnswerRe: Auto fire method when assembly is loaded Pin
Luc Pattyn16-Jun-09 1:45
sitebuilderLuc Pattyn16-Jun-09 1:45 
GeneralRe: Auto fire method when assembly is loaded Pin
nick_dodd16-Jun-09 2:35
nick_dodd16-Jun-09 2:35 
QuestionPassing an open TCP socket to another application Pin
supercat915-Jun-09 6:30
supercat915-Jun-09 6:30 
AnswerRe: Passing an open TCP socket to another application Pin
Mark Salsbery15-Jun-09 6:40
Mark Salsbery15-Jun-09 6:40 
GeneralRe: Passing an open TCP socket to another application Pin
supercat915-Jun-09 7:17
supercat915-Jun-09 7:17 
GeneralRe: Passing an open TCP socket to another application Pin
Mark Salsbery15-Jun-09 8:02
Mark Salsbery15-Jun-09 8:02 
GeneralAsync socket I/O Pin
supercat915-Jun-09 8:23
supercat915-Jun-09 8:23 
Mark Salsbery wrote:
I prefer a class that represents/wraps a connection (e.g. a socket) and handles
its own asynchronous I/O.


I never really got a grasp of how to asynchronous I/O with operations that may need to time out or be aborted; I've read that there isn't really good support for that. I think the concern by the socket implementors was that if an application times out or otherwise decides to abort an operation with a TCP socket, there's no guarantee as to what data may or may not be 'in transit'. Certainly such an issue is reasonable, but in some cases it may be easier and cheaper to recover from the 'unknown data' scenario than to close and reopen the socket. For example, if the remote system includes an 'echo' command, the PC can ask the remote machine to echo back a GUID, repeating the request until the proper GUID is echoed(*). Once the proper echo is received, the PC will know that the only thing that could possibly be in the transmit pipe would be more copies of the 'echo' command, and the only thing that could possibly be in the receive pipe would be more copies of the echoed GUID.

(*) If both endpoints were running TCP natively, there would be no point in retransmitting the data. On the other hand, many embedded systems use a TCP-to-serial gateway, and there is a possibility of data loss on the serial link.

What would be the best way to set up an application if it has to be able to exchange data via the following three methods, interchangeably:

-1- TCP socket

-2- Serial port

-3- Thread which polls a custom USB device each millisecond to see if there's any data

Are there any good example programs showing how best to do such things?
GeneralRe: Async socket I/O Pin
Mark Salsbery15-Jun-09 9:21
Mark Salsbery15-Jun-09 9:21 
GeneralRe: Async socket I/O Pin
supercat915-Jun-09 10:01
supercat915-Jun-09 10:01 
GeneralRe: Async socket I/O Pin
Mark Salsbery15-Jun-09 10:16
Mark Salsbery15-Jun-09 10:16 
GeneralRe: Async socket I/O Pin
supercat915-Jun-09 11:39
supercat915-Jun-09 11:39 
GeneralRe: Passing an open TCP socket to another application Pin
led mike15-Jun-09 9:17
led mike15-Jun-09 9:17 
GeneralRe: Passing an open TCP socket to another application Pin
Mark Salsbery15-Jun-09 9:24
Mark Salsbery15-Jun-09 9:24 
GeneralRe: Passing an open TCP socket to another application Pin
supercat915-Jun-09 9:49
supercat915-Jun-09 9:49 
GeneralRe: Passing an open TCP socket to another application Pin
led mike15-Jun-09 10:29
led mike15-Jun-09 10:29 
Questionhow to create crystal report in vb.net using sql server 2005. Pin
Neeta Sen12-Jun-09 21:58
Neeta Sen12-Jun-09 21:58 
Questionrearrange database Serial number after deleting a row Pin
Neeta Sen12-Jun-09 21:28
Neeta Sen12-Jun-09 21:28 
AnswerRe: rearrange database Serial number after deleting a row Pin
Eddy Vluggen13-Jun-09 0:57
professionalEddy Vluggen13-Jun-09 0:57 
AnswerRe: rearrange database Serial number after deleting a row Pin
Dave Kreskowiak13-Jun-09 2:07
mveDave Kreskowiak13-Jun-09 2:07 
AnswerRe: rearrange database Serial number after deleting a row Pin
David Skelly14-Jun-09 22:29
David Skelly14-Jun-09 22:29 
QuestionReflecting attribute metadata from an instance of the type, not the type itself Pin
Gregory Gadow12-Jun-09 5:51
Gregory Gadow12-Jun-09 5:51 
AnswerProblem figured out Pin
Gregory Gadow12-Jun-09 7:21
Gregory Gadow12-Jun-09 7:21 
QuestionShipping Services - FedEx Pin
Saritha Palekula12-Jun-09 2:08
Saritha Palekula12-Jun-09 2:08 
AnswerRe: Shipping Services - FedEx Pin
Dave Kreskowiak12-Jun-09 4:08
mveDave Kreskowiak12-Jun-09 4:08 

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.