Re: [Mono-list] SPAM-LOW: Console app start at start up?
Something else came to mind. Do I need to give the executable file (on linux) any other permission than execute (chmod +x my.exe) ??? I have re-written my prototype to use ansynchronous sockets instead of TcpListener and still cannot get the socket server to run on linux (CentOS 4). I have the firewall turned off for that computer as well. I even tried running as a Console app and the socket server still will not run. It can't be this difficult, LOL. Thanks again for any help or advice. Lee > > > I have had a bit of difficulty in implementing a socket > server as a service application with mono and have been asked > to enter a report in bugzilla which I have done. Must I use > a service application to have a program run at startup? > > Can a console app be made to start up automatically? Does > that even make sense to do? > > I looked into using xinet.d but it seems that the line buffer > is limited to > 255 bytes and I will be sending xml packets back and forth > that will exceed that easily. > ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] SPAM-LOW: Console app start at start up?
Does the executable keep running, or does it just quite immediately? Regards, Matthijs ter Woord - Original Message - From: "Lee" <[EMAIL PROTECTED]> To: "'Lee'" <[EMAIL PROTECTED]>; Sent: Friday, June 23, 2006 6:13 PM Subject: Re: [Mono-list] SPAM-LOW: Console app start at start up? > > > Something else came to mind. Do I need to give the executable file (on > linux) any other permission than execute (chmod +x my.exe) ??? > > I have re-written my prototype to use ansynchronous sockets instead of > TcpListener and still cannot get the socket server to run on linux (CentOS > 4). I have the firewall turned off for that computer as well. > > I even tried running as a Console app and the socket server still will not > run. > > It can't be this difficult, LOL. > > Thanks again for any help or advice. > > Lee > > > > > > > > I have had a bit of difficulty in implementing a socket > > server as a service application with mono and have been asked > > to enter a report in bugzilla which I have done. Must I use > > a service application to have a program run at startup? > > > > Can a console app be made to start up automatically? Does > > that even make sense to do? > > > > I looked into using xinet.d but it seems that the line buffer > > is limited to > > 255 bytes and I will be sending xml packets back and forth > > that will exceed that easily. > > > > ___ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Auto Running Processeses
Lee,I've attached a file with some code from my app. I hope it helps get you going in the right direction as it has worked for me on windows and linux. There are some comments between sections in the attached code. I've included a method where the TcpListener is instantiated, a MyService base class and a Driver class which inherits from MyService. Look for the ServiceMain method in the Driver class and create your TcpListener therein. Let me know how it goes,--TravisLee <[EMAIL PROTECTED]> wrote: Thanks a bunch, Travis. I was wondering...for your socket server, do you use asynchronous sockets? I have tried using a TcpListener from within a service application and the socket server fails to start. I'm wondering what pattern you used for your socket server. Thanks again, Lee From: Travis Staloch[mailto:[EMAIL PROTECTED] Sent: Friday, June 23, 2006 2:03AMTo: LeeSubject: RE: [Mono-list] Auto RunningProcesseses Lee,Here in the init.d file which I've used to start mymono service. I hope that you're able to get your service working onmono. I know that mine took a little work to get ported over tolinux.I think you just have to put this script in your /etc/init.dfolder to get it to run at startup. I might be wrong. Let me knowhow it goes if you have time.--TravisLee<[EMAIL PROTECTED]> wrote: Travis, Would you mind terribly providing me with a copy of the script that you used? I have tried the script link that you sent me and I can't seem to get it to work. Thanks, Lee From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED] On Behalf Of TravisStalochSent: Tuesday, June 20, 2006 1:39 AMTo:mono-list@ximian.comSubject: Re: [Mono-list] Auto RunningProcesseses Lee,I've written a C# TCP socket service which runs onwindows and linux. It uses System.ServiceProcess, inheriting fromSystem.ServiceProcess.ServiceBase. The app was originally written onwindows and worked fine there installed as a service usinginstallutil. When I moved over to linux, I discovered that I had tostart it with MonoService.exe (found in MonoRoot/bin I think). I had to write an init.d script similar to the one mentioned here in order to get the process launched at OSstartup. --TravisLee<[EMAIL PROTECTED]> wrote:Hi all, I apologize for the basic question here, but I am new to linux. To makethings a bit easier on myself, I'm using VS2005 for my development since Iuse that for windows development as well. I am writing a TCP socket serverand want it to run as an automatic process. Should that be written as a console app or as a Service app?Again, sorry for the basic question.Thanks,Lee___Mono-list maillist - Mono-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-list Want to be your own boss? Learn how on Yahoo!Small Business.--No virus found in this incomingmessage.Checked by AVG Free Edition.Version: 7.1.394 / VirusDatabase: 268.9.1/369 - Release Date: 6/19/2006Yahoo! Messenger with Voice. MakePC-to-Phone Calls to the US (and 30+ countries) for 2�/min or less. --No virus found in this incoming message.Checked byAVG Free Edition.Version: 7.1.394 / Virus Database: 268.9.2/372 - ReleaseDate: 6/21/2006 Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. Lee, here's where I use the tcpListener: /// /// Open and listen to a local socket connection /// /// 0 on success public int DoPortSources() { // for now, just listen to the first port source defined PortSource portSrc = portSourceList[0]; log.WriteLogEntry("PortSource", "Listening to PortSource: " + portSrc.Name + " on hostname: " + portSrc.Hostname + " or ip: " + portSrc.Ip + " on port: " + portSrc.Port.ToString(), DebugLevel.Info); IPAddress ipAddress; if(portSrc.Hostname != null) ipAddress = Dns.Resolve(portSrc.Hostname).AddressList[0]; else ipAddress = IPAddress.Parse(portSrc.Ip); // start listening to the socket TcpListener listener = new TcpListener(ipAddress, portSrc.Port); listener.Start(); // accepting the pending connection request from the WPC TcpClient socketAccepted = null; socketAccepted = listener.AcceptTcpClient(); return DoReader(socketAccepted.GetStream()); } Here's the base class which adds a few thing to ServiceBase: using System; using System.Threading; namespace SportsFeed { /// /// Summary description for MyService.
[Mono-list] favorite IDE ?
Pool: what's your favorite IDE for Mono development ? I am using SciTE with my own generated API file, coupled with Make for project building. I found it to be simple, effective, and easy to configure, although I am considering switching to vim. I would've used Monodevelop, but I found it too buggy. Somehow, I do not like full-blown IDEs. Even if I had Windows and VStudio installed, I would still prefer a simple and fast editor. Is anybody else feeling like me ? :) ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] favorite IDE ?
At school I always use GVIM, even for C#. GVIM and an GMCS can be good friends for little programs. On 6/23/06, Alex Nedelcu <[EMAIL PROTECTED]> wrote: > Pool: what's your favorite IDE for Mono development ? > > I am using SciTE with my own generated API file, coupled with Make for > project building. > I found it to be simple, effective, and easy to configure, although I am > considering switching to vim. > I would've used Monodevelop, but I found it too buggy. > > Somehow, I do not like full-blown IDEs. > Even if I had Windows and VStudio installed, I would still prefer a > simple and fast editor. > Is anybody else feeling like me ? :) > > ___ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list > ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] favorite IDE ?
> Pool: what's your favorite IDE for Mono development ? > I am using SciTE with my own generated API file, coupled with Make for > project building. > I found it to be simple, effective, and easy to configure, although I am > considering switching to vim. > I would've used Monodevelop, but I found it too buggy. Used to be, latest version has been rock-solid for me. > Somehow, I do not like full-blown IDEs. > Even if I had Windows and VStudio installed, I would still prefer a > simple and fast editor. > Is anybody else feeling like me ? :) Monodevelop! I used to feel the same way about IDEs, but GUI bits and all the references got more and more complicated. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] SPAM-LOW: Console app start at start up?
Got it working (TcpListener), thanks all. Lee > > I have had a bit of difficulty in implementing a socket server as a > > service application with mono and have been asked to enter > a report in > > bugzilla which I have done. Must I use a service > application to have > > a program run at startup? > > > > Can a console app be made to start up automatically? Does > that even > > make sense to do? > > > > I looked into using xinet.d but it seems that the line buffer is > > limited to > > 255 bytes and I will be sending xml packets back and forth > that will > > exceed that easily. > > > ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list