[Mono-list] Hello

Jeremiah McElroy jeremiah@facility9.com
Sun, 25 May 2003 22:01:03 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0003_01C32309.22F56050
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

>From reading the MS Documentation (.NET SDK 1.1, VS.NET 2003 EA for =
those
who are interested in these things), it says something along the lines =
of
'you must close each accepted connection individually.'
=20
What I took this to mean is that you will have to build a stack of your =
own
for all client connections and then  when you call TcpListener.Stop(),
you'll have to loop through your stack and Stop() all of those =
connections
as well.  I could be wrong on the subject, I usually deal with POP3 and =
SMTP
or raw nasty sockets that die quickly and don't persist any kind of =
state.
=20
As for the file system watcher problem, I ran into something like that a
while ago.  My brother and I found a post online about re-reading a
web.config file (works just the same for any app.config =
[proc.exe.config]
that you can run across).  I forget how the work-around went, but there =
is
some issue with the .NET framework where it reads in the *.config file =
at
application start and persists a copy resident in memory.  Of course, =
I'm
sure that others on this list would know far more about these aspects of
Mono than I.  In recent work for a software monitoring app which I have
written at work, I have forced a re-read on every cycle of the thread
(approx every 5 mintues) of both the config file and the DB (which makes
things easier). =20
=20
If I run across that article I will be sure to post the link and send to
you.
=20
Later,
=20
Jeremiah McElroy
=20
We all learn by sharing what we know

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Terry
Sent: Saturday, May 24, 2003 10:51 PM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Hello


Hello all,
=20
I just thought I'd introduce myself to the list before asking questions.
I'm a software developer by profession and I work on a free game server =
tool
in my spare time.  After adding a server-side portion to my app, I got
several requests for Linux support and I started looking at C/C++ and C# =
as
an option.  A co-worker told me about Mono and I started working with =
the
0.23 release.  Great job!  I'm very impressed with the progress so far -
it's a huge thrill for me to take a binary and watch it work on both =
Windows
and Linux.  I'm very excited about the future!
=20
It's a simple TCP server that allows admins to have remote access to =
their
game consoles.  So far, it's working pretty well, but I've come across a
couple things that, as far as I can tell, should be operational, but =
isn't
working for me. =20
=20
I just installed 0.24 on RH8 without garbage collection.  The "make" =
failed
with an invalid "-lgc" option (problem with configure?).  I've run into =
two
problems with TcpListener and FileSystemWatcher....
=20
[Newbie flame suit on]
I have a thread that calls "TcpListener.AcceptSocket()" and keeps =
looping
handling the new connection requests.  This works great.  However, when =
I go
to shut down, I call "TcpListener.Stop()" from a different thread and =
then
"Join" to wait for the server thread to exit.  It never exists because =
the
server thread is still blocking on the "AcceptSocket()" call.  Shouldn't
calling "Stop" interrupt the "AcceptSocket()" call?  Or is that an =
invalid
assumption?
=20
Also, I want to use FileSystemWatcher to watch for changes to my cfg =
files,
but after setting things up, it appears that after making changes to =
files
in the watched directory, the changed event never fires.  It does work =
on
Windows, however.  I do not get an exception - nothing happens.  I'm =
using
the "FileSystemWatcher/FileSystemEventHandler" method rather than the
"WaitForChanged" method (I see that's not implemented yet :-).
[Newbie flame suit off]
=20
I can post code if it's relevant...
=20
Thanks,
Terry


------=_NextPart_000_0003_01C32309.22F56050
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =
size=3D2>From=20
reading the MS Documentation (.NET SDK 1.1, VS.NET 2003 EA for those who =
are=20
interested in these things), it says something along the lines of 'you =
must=20
close each accepted connection individually.'</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =
size=3D2>What I=20
took this to mean is that you will have to build a stack of your own for =
all=20
client connections and then&nbsp; when you call TcpListener.Stop(), =
you'll have=20
to loop through your stack and Stop() all of those connections as =
well.&nbsp; I=20
could be wrong on the subject, I usually deal with POP3 and SMTP or raw =
nasty=20
sockets that die quickly and don't persist any kind of=20
state.</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =
size=3D2>As for=20
the file system watcher problem, I ran into something like that a while=20
ago.&nbsp; My brother and I found&nbsp;a post online about re-reading a=20
web.config file (works just the same for any app.config =
[proc.exe.config] that=20
you can run across).&nbsp; I forget how the work-around went, but there =
is some=20
issue with the .NET framework where it reads in the *.config file at =
application=20
start and persists a copy resident in memory.&nbsp; Of course, I'm sure =
that=20
others on this list would know far more about these aspects of Mono than =

I.&nbsp; In recent work for a software monitoring app which I have =
written at=20
work, I have forced a re-read on every cycle of the thread (approx every =
5=20
mintues) of both the config file and the DB (which makes things =
easier).&nbsp;=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =
size=3D2>If I=20
run ac</FONT></SPAN><SPAN class=3D065215501-26052003><FONT face=3DArial=20
color=3D#0000ff size=3D2>ross that article I will be sure to post the =
link and send=20
to you.</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2>Later,</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2>Jeremiah McElroy</FONT></SPAN></DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D065215501-26052003><FONT face=3DArial color=3D#0000ff =
size=3D2>We all=20
learn by sharing what we know</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B>=20
  mono-list-admin@lists.ximian.com =
[mailto:mono-list-admin@lists.ximian.com]=20
  <B>On Behalf Of </B>Terry<BR><B>Sent:</B> Saturday, May 24, 2003 10:51 =

  PM<BR><B>To:</B> mono-list@lists.ximian.com<BR><B>Subject:</B> =
[Mono-list]=20
  Hello<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial =
size=3D2>Hello=20
  all,</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial size=3D2>I =
just thought I'd=20
  introduce myself to the list before asking questions.&nbsp; I'm a =
software=20
  developer by profession and I work on a free game server tool in my =
spare=20
  time.&nbsp; After adding a server-side portion to my app, I got =
several=20
  requests for Linux support and I started looking at C/C++ and C# as an =

  option.&nbsp; A co-worker told me about Mono and I started working =
with the=20
  0.23 release.&nbsp; Great job!&nbsp; I'm very impressed with the =
progress so=20
  far - it's a huge thrill for me to take a binary and watch it work on =
both=20
  Windows and Linux.&nbsp; I'm very excited about the=20
future!</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial size=3D2>It's =
a simple TCP=20
  server that allows admins to have remote access to their game =
consoles.&nbsp;=20
  So far, it's working pretty well, but I've come across a couple things =
that,=20
  as far as I can tell, should be operational, but isn't working for =
me.&nbsp;=20
  </FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial size=3D2>I =
just installed=20
  0.24 on RH8 without garbage collection.&nbsp; The "make" failed with =
an=20
  invalid "-lgc" option (problem with configure?).&nbsp; I've run into =
two=20
  problems with TcpListener and =
FileSystemWatcher....</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial =
size=3D2>[Newbie flame suit=20
  on]</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial size=3D2>I =
have a thread=20
  that calls "TcpListener.AcceptSocket()" and keeps looping handling the =
new=20
  connection requests.&nbsp; This works great.&nbsp; However, when I go =
to shut=20
  down, I call "TcpListener.Stop()" from a different thread and then =
"Join" to=20
  wait for the server thread to exit.&nbsp; It never exists because the =
server=20
  thread is still blocking on the "AcceptSocket()" call.&nbsp; Shouldn't =
calling=20
  "Stop" interrupt the "AcceptSocket()" call?&nbsp; Or is that an =
invalid=20
  assumption?</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial =
size=3D2>Also, I want to=20
  use FileSystemWatcher to watch for changes to my cfg files, but after =
setting=20
  things up, it appears that after making changes to files in the =
watched=20
  directory, the changed event never fires.&nbsp; It does work on =
Windows,=20
  however.&nbsp; I do not get an exception - nothing happens.&nbsp; I'm =
using=20
  the "FileSystemWatcher/<FONT size=3D2>FileSystemEventHandler" method =
rather than=20
  the "WaitForChanged" method (I see that's not implemented yet=20
  :-).</FONT></FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial =
size=3D2>[Newbie flame suit=20
  off]</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial size=3D2>I =
can post code if=20
  it's relevant...</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2>Thanks,</FONT></SPAN></DIV>
  <DIV><SPAN class=3D625372302-25052003><FONT face=3DArial=20
  size=3D2>Terry</FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0003_01C32309.22F56050--