Click here to Skip to main content
16,014,860 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to find out if an object type supports a given arithmetic operator Pin
Luc Pattyn5-Aug-09 5:03
sitebuilderLuc Pattyn5-Aug-09 5:03 
GeneralRe: How to find out if an object type supports a given arithmetic operator Pin
Duncan Edwards Jones5-Aug-09 5:37
professionalDuncan Edwards Jones5-Aug-09 5:37 
GeneralRe: How to find out if an object type supports a given arithmetic operator Pin
Luc Pattyn5-Aug-09 5:51
sitebuilderLuc Pattyn5-Aug-09 5:51 
AnswerRe: How to find out if an object type supports a given arithmetic operator Pin
PIEBALDconsult5-Aug-09 9:19
mvePIEBALDconsult5-Aug-09 9:19 
QuestionProblem when reading single numeric values from an Excel worksheet Pin
KeesDekker5-Aug-09 4:50
KeesDekker5-Aug-09 4:50 
AnswerRe: Problem when reading single numeric values from an Excel worksheet Pin
Eddy Vluggen5-Aug-09 5:03
professionalEddy Vluggen5-Aug-09 5:03 
GeneralRe: Problem when reading single numeric values from an Excel worksheet Pin
KeesDekker5-Aug-09 22:01
KeesDekker5-Aug-09 22:01 
QuestionFast messages not sent through TcpClient Pin
bocsiboti5-Aug-09 4:29
bocsiboti5-Aug-09 4:29 
Hello,

I am writing a server/client application and I have encountered a weird problem. The server handles several TCP connections and sometimes sends messages to the clients. Now, if I send these messages too "fast" they are not sent at all. However, if a Thread.Sleep(1000); command is introduced before sending a message everything works fine (except it is very slow). Maybe it is relevant that the Send() method is called by different threads , triggered by events (locking the communication object does not help). Here is the code:

public void Send(int id, string message) 
        {
            //Thread.Sleep(1000);            
            
            StreamWriter writer = new StreamWriter(connections_[id].GetStream());
            // type of connections_ is Dictionary<int, TcpClient>

            writer.WriteLine(message);
            
            writer.Flush();               
        }  

AnswerRe: Fast messages not sent through TcpClient Pin
Ennis Ray Lynch, Jr.5-Aug-09 4:54
Ennis Ray Lynch, Jr.5-Aug-09 4:54 
GeneralRe: Fast messages not sent through TcpClient Pin
bocsiboti6-Aug-09 3:04
bocsiboti6-Aug-09 3:04 
GeneralRe: Fast messages not sent through TcpClient Pin
Ennis Ray Lynch, Jr.6-Aug-09 6:06
Ennis Ray Lynch, Jr.6-Aug-09 6:06 
GeneralRe: Fast messages not sent through TcpClient Pin
bocsiboti6-Aug-09 20:04
bocsiboti6-Aug-09 20:04 
AnswerRe: Fast messages not sent through TcpClient Pin
Luc Pattyn5-Aug-09 5:07
sitebuilderLuc Pattyn5-Aug-09 5:07 
GeneralRe: Fast messages not sent through TcpClient Pin
bocsiboti6-Aug-09 3:06
bocsiboti6-Aug-09 3:06 
GeneralRe: Fast messages not sent through TcpClient Pin
Luc Pattyn6-Aug-09 3:09
sitebuilderLuc Pattyn6-Aug-09 3:09 
QuestionMaking a wrapper: execlp or fork [modified] Pin
ajester655-Aug-09 4:28
ajester655-Aug-09 4:28 
QuestionTrying to create a shortcut... Pin
JollyMansArt5-Aug-09 4:25
JollyMansArt5-Aug-09 4:25 
AnswerRe: Trying to create a shortcut... Pin
Jimmanuel5-Aug-09 5:32
Jimmanuel5-Aug-09 5:32 
QuestionReplication Feature of SQL 2005 Pin
Abdul Rahman Hamidy5-Aug-09 3:38
Abdul Rahman Hamidy5-Aug-09 3:38 
AnswerRe: Replication Feature of SQL 2005 Pin
Ennis Ray Lynch, Jr.5-Aug-09 4:19
Ennis Ray Lynch, Jr.5-Aug-09 4:19 
GeneralRe: Replication Feature of SQL 2005 Pin
Abdul Rahman Hamidy5-Aug-09 4:26
Abdul Rahman Hamidy5-Aug-09 4:26 
GeneralRe: Replication Feature of SQL 2005 Pin
Ennis Ray Lynch, Jr.5-Aug-09 4:30
Ennis Ray Lynch, Jr.5-Aug-09 4:30 
GeneralRe: Replication Feature of SQL 2005 Pin
Abdul Rahman Hamidy5-Aug-09 4:35
Abdul Rahman Hamidy5-Aug-09 4:35 
GeneralRe: Replication Feature of SQL 2005 Pin
Ennis Ray Lynch, Jr.5-Aug-09 4:44
Ennis Ray Lynch, Jr.5-Aug-09 4:44 
GeneralRe: Replication Feature of SQL 2005 Pin
Abdul Rahman Hamidy5-Aug-09 4:51
Abdul Rahman Hamidy5-Aug-09 4:51 

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.