Click here to Skip to main content
16,017,944 members
Home / Discussions / C#
   

C#

 
QuestionLasso tool for free image selections Pin
Barbarus24-Oct-07 0:02
Barbarus24-Oct-07 0:02 
AnswerRe: Lasso tool for free image selections Pin
Christian Graus24-Oct-07 0:36
protectorChristian Graus24-Oct-07 0:36 
JokeRe: Lasso tool for free image selections Pin
Luc Pattyn24-Oct-07 2:02
sitebuilderLuc Pattyn24-Oct-07 2:02 
QuestionRe: Lasso tool for free image selections Pin
Barbarus24-Oct-07 3:06
Barbarus24-Oct-07 3:06 
QuestionAdd File in System New menu Pin
Abhijit Jana23-Oct-07 23:53
professionalAbhijit Jana23-Oct-07 23:53 
AnswerRe: Add File in System New menu Pin
Anthony Mushrow24-Oct-07 1:11
professionalAnthony Mushrow24-Oct-07 1:11 
GeneralRe: Add File in System New menu Pin
Abhijit Jana24-Oct-07 2:13
professionalAbhijit Jana24-Oct-07 2:13 
QuestionProperly Creating / Disposing of Socket connections Pin
hammerstein0523-Oct-07 23:41
hammerstein0523-Oct-07 23:41 
I've been writing a client / server app for a while now, and in the original version I had a load of exception handling. Recently I've come to rewrite this and I think it's time for me to learn some lessons on what exactly I'm doing. The first part I need to solve is my client connection to a remote Unix server.

_connectionSocket.LocalSocket =<br />
<br />
new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );<br />
<br />
_connectionSocket.TimeStamp = DateTime.Now;<br />
<br />
IPEndPoint remoteEndPoint = new IPEndPoint( Dns.GetHostEntry( remoteIp ).AddressList[ 0 ], remotePort );<br />
<br />
_connectionSocket.LocalSocket.Connect( remoteEndPoint );<br />
<br />
_connectionSocket.LocalSocket.BeginReceive( _connectionSocket.DataBuffer, 0, SocketPacket.BufferSize,<br />
<br />
SocketFlags.None, OnDataReceived, _connectionSocket );


_connectionSocket is SocketPacket object containing my socket, the buffer etc. I'm following what I've seen done in other comms code. When I disconnect;


if( _connectionSocket.LocalSocket != null)<br />
<br />
{<br />
<br />
_connectionSocket.LocalSocket.Shutdown( SocketShutdown.Both );<br />
<br />
_connectionSocket.LocalSocket.Close( 5 );<br />
<br />
}


I'm having issues in that when I'm trying to shutdown, my code is hanging (I know that 5 means seconds to wait to complete sending messages and I don't think that's it). And then I can't establish a new connection, I have to wait a few minutes before the connection is dropped. Can anyone guide me here/
QuestionHow to cancel BindingNavigator event. Pin
azifaliazif23-Oct-07 23:26
azifaliazif23-Oct-07 23:26 
AnswerRe: How to cancel BindingNavigator event. Pin
c0ax_lx23-Oct-07 23:52
c0ax_lx23-Oct-07 23:52 
GeneralRe: How to cancel BindingNavigator event. Pin
azifaliazif24-Oct-07 0:15
azifaliazif24-Oct-07 0:15 
AnswerRe: How to cancel BindingNavigator event. Pin
azifaliazif24-Oct-07 23:11
azifaliazif24-Oct-07 23:11 
QuestionDateTime insert SQL Query in C# Pin
dataminers23-Oct-07 23:22
dataminers23-Oct-07 23:22 
AnswerRe: DateTime insert SQL Query in C# Pin
Christian Graus23-Oct-07 23:30
protectorChristian Graus23-Oct-07 23:30 
GeneralRe: DateTime insert SQL Query in C# Pin
Guffa23-Oct-07 23:54
Guffa23-Oct-07 23:54 
AnswerRe: DateTime insert SQL Query in C# Pin
Colin Angus Mackay23-Oct-07 23:36
Colin Angus Mackay23-Oct-07 23:36 
AnswerRe: DateTime insert SQL Query in C# Pin
Guffa24-Oct-07 0:08
Guffa24-Oct-07 0:08 
Questionhow get data from database [modified] Pin
alok217123-Oct-07 23:05
alok217123-Oct-07 23:05 
AnswerRe: how get data into drop down box from database Pin
pmarfleet23-Oct-07 23:11
pmarfleet23-Oct-07 23:11 
Questionproperty grid Pin
sindhutiwari23-Oct-07 22:47
sindhutiwari23-Oct-07 22:47 
AnswerRe: property grid Pin
Christian Graus23-Oct-07 23:03
protectorChristian Graus23-Oct-07 23:03 
GeneralRe: property grid Pin
sindhutiwari23-Oct-07 23:07
sindhutiwari23-Oct-07 23:07 
GeneralRe: property grid Pin
Christian Graus23-Oct-07 23:28
protectorChristian Graus23-Oct-07 23:28 
QuestionUse window application in Web Application Pin
Sun Rays23-Oct-07 22:46
Sun Rays23-Oct-07 22:46 
AnswerRe: Use window application in Web Application Pin
Christian Graus23-Oct-07 22:50
protectorChristian Graus23-Oct-07 22:50 

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.