Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
QuestionWrap around Single Dimension array Pin
Blade24323-Apr-08 14:46
Blade24323-Apr-08 14:46 
GeneralRe: Wrap around Single Dimension array Pin
Anthony Mushrow23-Apr-08 15:47
professionalAnthony Mushrow23-Apr-08 15:47 
GeneralRe: Wrap around Single Dimension array Pin
Jordanwb23-Apr-08 15:55
Jordanwb23-Apr-08 15:55 
GeneralRe: Wrap around Single Dimension array Pin
Blade24323-Apr-08 17:06
Blade24323-Apr-08 17:06 
GeneralRe: Wrap around Single Dimension array Pin
Jordanwb24-Apr-08 2:08
Jordanwb24-Apr-08 2:08 
GeneralRe: Wrap around Single Dimension array Pin
Guffa23-Apr-08 21:09
Guffa23-Apr-08 21:09 
Questionusing of dataset generated , dataset.xsc or .xss Pin
Knowledgestudent23-Apr-08 11:14
Knowledgestudent23-Apr-08 11:14 
GeneralProperly disconnecting and shutting down a socket. [modified] Pin
Jordanwb23-Apr-08 10:26
Jordanwb23-Apr-08 10:26 
Again with the sockets jordan?! Yep. On the host end I have a List of sockets:

<br />
List <socket> sockets  = new List <socket> ();<br />


Now when I get the "OnAccept" callback I add the new socket to the list mentionned above*. When the host closes the form, I iterate through each Socket in the list. What I want to know is how to disconnect and shutdown a socket properly, as well as for the Client. The client has only one socket.

There is Socket.Disconnect (bool reuse), Socket.Shutdown (SocketShutdown how) and Socket.Close () and I'm confused what I'm supposed to use and in what order. I suspect all three in the order that I mentionned.

*

<br />
private void OnAccept (IAsyncResult ar)<br />
{<br />
Socket new_socket = connection_starter.EndAccept (ar);<br />
sockets.Add (new_socket);<br />
<br />
connection_starter.BeginAccept(whatever, null, void, foo, bar);<br />
}<br />


Thanks.

modified on Wednesday, April 23, 2008 4:32 PM

GeneralRe: Properly disconnecting and shutting down a socket. Pin
Gareth H23-Apr-08 12:55
Gareth H23-Apr-08 12:55 
GeneralRe: Properly disconnecting and shutting down a socket. Pin
Jordanwb25-Apr-08 9:11
Jordanwb25-Apr-08 9:11 
GeneralImporting a csv Pin
BraveKnightFSJ23-Apr-08 10:07
BraveKnightFSJ23-Apr-08 10:07 
GeneralRe: Importing a csv Pin
Christian Graus23-Apr-08 10:25
protectorChristian Graus23-Apr-08 10:25 
GeneralRe: Importing a csv Pin
BraveKnightFSJ23-Apr-08 12:29
BraveKnightFSJ23-Apr-08 12:29 
GeneralRe: Importing a csv Pin
Christian Graus23-Apr-08 12:38
protectorChristian Graus23-Apr-08 12:38 
GeneralRe: Importing a csv Pin
BraveKnightFSJ24-Apr-08 10:17
BraveKnightFSJ24-Apr-08 10:17 
QuestionSQL Server Authentication Pin
aecordoba23-Apr-08 9:33
aecordoba23-Apr-08 9:33 
GeneralRe: SQL Server Authentication Pin
Sam Xavier24-Apr-08 21:05
Sam Xavier24-Apr-08 21:05 
GeneralRe: SQL Server Authentication Pin
aecordoba25-Apr-08 3:47
aecordoba25-Apr-08 3:47 
GeneralRe: SQL Server Authentication Pin
Sam Xavier28-Apr-08 20:07
Sam Xavier28-Apr-08 20:07 
GeneralXML file resturctued with XSL style sheet Pin
zaboboa23-Apr-08 9:26
zaboboa23-Apr-08 9:26 
GeneralRe: XML file resturctued with XSL style sheet Pin
led mike23-Apr-08 9:33
led mike23-Apr-08 9:33 
GeneralRe: XML file resturctued with XSL style sheet Pin
zaboboa23-Apr-08 10:10
zaboboa23-Apr-08 10:10 
GeneralRe: XML file resturctued with XSL style sheet Pin
zaboboa23-Apr-08 10:11
zaboboa23-Apr-08 10:11 
QuestionIVR System Pin
KBM7323-Apr-08 7:08
KBM7323-Apr-08 7:08 
NewsRe: IVR System Pin
carbon_golem23-Apr-08 8:11
carbon_golem23-Apr-08 8:11 

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.