Click here to Skip to main content
15,890,609 members
Home / Discussions / C#
   

C#

 
GeneralRe: ABOUT MARSHAL IN MC++ Pin
David Stone9-Dec-02 8:46
sitebuilderDavid Stone9-Dec-02 8:46 
GeneralRe: ABOUT MARSHAL IN MC++ Pin
Nick Parker9-Dec-02 9:52
protectorNick Parker9-Dec-02 9:52 
GeneralRe: ABOUT MARSHAL IN MC++ Pin
novachen9-Dec-02 14:39
novachen9-Dec-02 14:39 
GeneralRe: ABOUT MARSHAL IN MC++ Pin
Nick Parker9-Dec-02 16:23
protectorNick Parker9-Dec-02 16:23 
GeneralSending Mail With Attachment With Web Service Problem Pin
yccheok8-Dec-02 18:03
yccheok8-Dec-02 18:03 
GeneralRe: Sending Mail With Attachment With Web Service Problem Pin
David Stone9-Dec-02 8:44
sitebuilderDavid Stone9-Dec-02 8:44 
GeneralWeb Cam Handle Still Hold By WMEncoder After Stop Called Pin
yccheok8-Dec-02 17:46
yccheok8-Dec-02 17:46 
GeneralHalt At Socket.Receive() Statement Pin
yccheok8-Dec-02 16:50
yccheok8-Dec-02 16:50 
i had build a light weighted http server and recently realize that there is some bugs inside.

in my constructor, i initialize the TcpListener and the thread for receiving incoming request as follow:
----------------------------------
myListener = new TcpListener(port);
myListener.Start();

//start the thread which calls the method 'StartListen'
myThread = new Thread(new ThreadStart(StartListen));
myThread.Start() ;
----------------------------------

in my StartListen
----------------------------------
while(isRunnable)
{
//Accept a new connection
Socket mySocket = myListener.AcceptSocket() ;

if(mySocket.Connected)
{
//make a byte array and receive data from the client
Byte[] bReceive = new Byte[1024] ;

int i = mySocket.Receive(bReceive,bReceive.Length,0); //BUGS??
// rest of the code goes here
----------------------------------
sometimes, when i use a web broswer making an HTTP/GET request, my web broswer takes 5 minutes to download the contents from the computer that run light weighted server(LWS) and still get no responde. it seems that it can establish a TCP/IP connection to the LWS but get no response from the LWS.

finally, i realize that LWS will halt at the line.
-----------------------------------
int i = mySocket.Receive(bReceive,bReceive.Length,0); //BUGS??
-----------------------------------

this happen "sometimes". where "sometimes" LWS works fine and "sometimes" LWS dont :P

can anyone point me out how can i solve this problem? thank you in advance.

regards
yccheok
QuestionHow to invoke DLL in C# Pin
Anonymous8-Dec-02 14:02
Anonymous8-Dec-02 14:02 
AnswerRe: How to invoke DLL in C# Pin
Eric Gunnerson (msft)9-Dec-02 12:46
Eric Gunnerson (msft)9-Dec-02 12:46 
GeneralProblem with double buffering in GDI+ Pin
djkno38-Dec-02 11:04
djkno38-Dec-02 11:04 
GeneralRe: Problem with double buffering in GDI+ Pin
Nick Parker8-Dec-02 12:16
protectorNick Parker8-Dec-02 12:16 
GeneralRe: Problem with double buffering in GDI+ Pin
djkno38-Dec-02 12:39
djkno38-Dec-02 12:39 
GeneralRe: Problem with double buffering in GDI+ Pin
Jon Rista8-Dec-02 13:08
Jon Rista8-Dec-02 13:08 
GeneralLooking for samples how to write an IRC client in C# Pin
gicio8-Dec-02 10:17
gicio8-Dec-02 10:17 
GeneralRe: Looking for samples how to write an IRC client in C# Pin
leppie9-Dec-02 8:18
leppie9-Dec-02 8:18 
GeneralTreeView Context menus Pin
Dave Kerr8-Dec-02 5:36
Dave Kerr8-Dec-02 5:36 
GeneralRe: TreeView Context menus Pin
leppie8-Dec-02 9:58
leppie8-Dec-02 9:58 
Generaltotal beginner Pin
GaryR8-Dec-02 1:13
GaryR8-Dec-02 1:13 
GeneralRe: total beginner Pin
joan_fl8-Dec-02 2:18
joan_fl8-Dec-02 2:18 
GeneralRe: total beginner Pin
GaryR8-Dec-02 4:15
GaryR8-Dec-02 4:15 
Generalresource bitmap to imagelist Pin
peterchen8-Dec-02 0:10
peterchen8-Dec-02 0:10 
GeneralRe: resource bitmap to imagelist Pin
Jon Rista8-Dec-02 13:51
Jon Rista8-Dec-02 13:51 
GeneralCollections and the Collection Editor Pin
Dave Kerr7-Dec-02 23:57
Dave Kerr7-Dec-02 23:57 
GeneralRe: Collections and the Collection Editor Pin
leppie8-Dec-02 0:50
leppie8-Dec-02 0: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.