Re: Sockets project
On Nov 19, 2004, at 2:46 AM, [EMAIL PROTECTED] wrote: I am investigating the options available for peer-to-peer messaging and direct data transfer for The Scripter's Scrapbook. If anyone has experience in sockets and would like to be involved, please contact me off-line at [EMAIL PROTECTED] Hi Hugh, While I have a super full plate at the moment, I offer my simple chat program that runs peer to peer. It is well commented and can be found on revNet. It is under CS Chatter Box. Hope it can help some. -- Best regards, Mark Talluto http://www.canelasoftware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Sockets project
I am investigating the options available for peer-to-peer messaging and direct data transfer for The Scripter's Scrapbook. If anyone has experience in sockets and would like to be involved, please contact me off-line at [EMAIL PROTECTED] Hugh Senior The Flexible Learning Company The Scripter's Scrapbook: www.ssbk.co.uk ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
What is the engine doing with datagram sockets?
I have been using sockets successfully (in MC and RunRev) for quite a while now...it is one of their strengths. Now I need to use datagram sockets, (in particular 'broadcasting') and I am discovering that this seems to be very different...and I cannot get datagram broadcasting working in Linux at all (error 13). In all fairness, it seems like opening a 'single' specific datagram socket works like a regular socket...but what I am trying to accomplish is broadcasting on 255.255.255.255 to a specific port for multiple devices, and it is very strange: (Windows XP - engine 2.5 or 2.5.1) - My broadcast computer generates it's own 'alias' datagram socket, and sends the data back to itself. - Since it does this, it gets to my 'receiving' handler first, and stops anything else from coming in: local udpSocket on mouseUp put into "255.255.255.255:199" udpSocket open datagram socket to udpSocket with message "ACCEPTED" accept datagram connections on port "199" with message "ACCEPTED" write "Roll Call" to socket udpSocket with message "getData" send "resetUDP" to me in 50 end mouseUp on ACCEPTED s,data put RETURN & s && data after message -- for testing end ACCEPTED on getData s,data put s && data & RETURN after message -- for testing end getData on resetUDP close socket udpSocket end resetUDP If I use the above script to broadcast to multiple devices, only the originating computer gets to the 'ACCEPTED' handler the first time (with it's 'alias' address)...what I discovered is, that I must close the socket, and repeat this process twice to get 'any' of the information from the other devices (basically pressing the button twice). But it really is worse than that...I must parse each response after that, and generate a listening port for each device: on ACCEPTED s,data set itemDelimiter to ":" put item 2 of s into thePort startListeningTo thePort end ACCEPTED on startListeningTo thePort if thePort is NOT among the lines of the openSockets then accept datagram connections on port thePort with Message "tryItAgain" end if end startListeningTo on tryItAgain s,data if "OK" is NOT among the words of data then -- the devices respond with "OK" write "ROLL CALL" to socket s with message "getData" end if end tryItAgain This actually works (this script is written from memory however...but the 'theory' is here), and I can now do my UDP broadcast (but only on XP so far). My question is...what is the engine doing with datagram sockets? Is this really how I must handle multiple responses from a broadcast? Has anyone had any better success at doing this? Here is what I believe the problem is: Opening a broadcast datagram socket is not really connecting to anything specific, so the MC/RunRev engine is somewhat in 'oblivion' about what is going on...and it generates it's own internal connection socket in response to receiving data on the listening port (becoming one of the responding devices). When multiple devices respond on the same port (i.e. receiving many messages on a datagram port) the engine is only accepting the 'first' one (itself), and ignoring the rest...but the data is in a buffer somewhere. So, when I close the socket, and reopen, the data that was 'buffered' is ready to be 'read' again. Hopefully, someone will look at this and say "you need to do this" , and everything will work. But, I have been through this enough now to feel that something else is happening 'behind the scenes' that I just don't have enough information about. Thanks for any info, JR ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Sockets and Servers with Linux 2.4.3
Haven't tracked this down yet... but in moving a simple http server stack over to run under the Linux 2.4.3 engine - I get no connection. The same stack serves up files fine with the 2.4.2 MacOs PPC version. I note there have been some changes to the way datagram sockets work in 2.4.3: The operation of datagram sockets has been changed on all platforms. In previous releases it was not possible to read and write to the same datagram socket. Now, you can do a single "read from socket with message " on the client datagram socket after opening it and all packets that arrive on that socket will send message . On the datagram server side, when a new packet arrives, a new socket that has the client address will be opened. You can then write to this socket to send a message back to the client, or immediately close it if only new incoming packets are needed. Could this change the way the HTTP server works - based on Andu's original ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
MetaCard 243 B2 sockets on MacOS
> MetaCard 2.4.3 alpha 2 is now available in the directory ft> p://ftp.metacard.com/MetaCard/2.4.3/ > See the README file in that directory for more information. > Scott Sorry Scott, but opening TCP sockets on MacOS PPC (OS 8.6) is still broken...or have you severely changed something? I can use my method of connecting perfectly up to this last 2.4.3 version. JR ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Sockets
Thanks for the socket references. I've got some homework to do. Greg Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets
There is a sockets example on the Runtime website, have a look at the user contributions section on the page below. http://www.runrev.com/revolution/developers/index.html Cheers, Rod Rod McCall Runtime Revolution Ltd, Edinburgh UK www.runrev.com - Original Message - From: "Phil Davis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 18, 2001 5:21 AM Subject: Re: Sockets > Hi Greg, > > There's a lot of info out there about sockets. Some of it can even be > understood by non-network-engineer types! No MetaTalk examples, but > you'll get it anyway. > > Here's a nice definition: > http://www.freesoft.org/CIE/Topics/20.htm > > You may gain more insight by comparing that one to some others: > http://whatis.techtarget.com/definition/0,,sid9_gci213021,00.html > http://www.webopedia.com/TERM/s/socket.html > > > For additional 'net info, I personally think the freesoft.org > "Programmed Instruction Course" is a great intro to how the internet > works: > http://www.freesoft.org/CIE/Course/index.htm > > Hope this helps. > Phil > > > - Original Message - > From: "Gregory Lypny" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 17, 2001 5:03 PM > Subject: Sockets > > > > Hi Everyone, > > > > Where can I find a primer on sockets, something like "Sockets for > > Dummies" with lots of MetaCard examples. > > > > Regards, > > > > Greg > > > > > > > > Gregory Lypny > > Associate Professor > > John Molson School of Business > > Concordia University > > _ > > "Absence of evidence is not evidence of absence." > > - Anonymous > > > > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets
Hi Greg, There's a lot of info out there about sockets. Some of it can even be understood by non-network-engineer types! No MetaTalk examples, but you'll get it anyway. Here's a nice definition: http://www.freesoft.org/CIE/Topics/20.htm You may gain more insight by comparing that one to some others: http://whatis.techtarget.com/definition/0,,sid9_gci213021,00.html http://www.webopedia.com/TERM/s/socket.html For additional 'net info, I personally think the freesoft.org "Programmed Instruction Course" is a great intro to how the internet works: http://www.freesoft.org/CIE/Course/index.htm Hope this helps. Phil - Original Message - From: "Gregory Lypny" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 17, 2001 5:03 PM Subject: Sockets > Hi Everyone, > > Where can I find a primer on sockets, something like "Sockets for > Dummies" with lots of MetaCard examples. > > Regards, > > Greg > > > > Gregory Lypny > Associate Professor > John Molson School of Business > Concordia University > _ > "Absence of evidence is not evidence of absence." > - Anonymous > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets
Hi Everyone, Where can I find a primer on sockets, something like "Sockets for Dummies" with lots of MetaCard examples. Regards, Greg Gregory Lypny Associate Professor John Molson School of Business Concordia University _ "Absence of evidence is not evidence of absence." - Anonymous
Re: sockets
On Mon, 27 Aug 2001 Rodney Tamblyn <[EMAIL PROTECTED]> wrote: > Some socket questions: > When using sockets to read and write I have been using the > following approach: write the length of the packet on a line > followed by the data, at receiving end read for one line, then read > for the supplied number of characters. What approaches do others > use? You can also read without specifying a "for" condition, a > specified handler will be called when data arrives. Are there any > advantages/disadvantages of one approach over the other? The simpler "read from socket with message " is much more efficient, and is the *only* reasonable way to use sockets that will be exchanging large amounts of data or when communicating with a large number of other hosts. I find it more convenient even for smaller-scale development because as long as the host on the other end always writes a complete message (and as long as it's less than 4K in length), you don't have to worry about this length/data problem: all the data they wrote in a single "write" command will come in with the message. > In general, if you have two stacks that are going to have an ongoing > series of communications going backwards and forwards, is it better > to leave the socket open, or always close the socket after each > communication. I've assumed the latter. Definitely: setup time for a TCP socket is pretty large, so you want to leave a socket open as long as there's any chance that you'll need to read or write to it later (this is the issue behind the "Keep-Alive" extension to the HTTP that was the big feature added for version 1.1 of that protocol). Note that "socketTimeout" messages will be sent periodically if the socket is inactive for the amount of time specified in the socketTimeoutInterval property. You can either just ignore them or use them as a cue to close the socket and notify the user that something has gone wrong. > Presumably there is a limit on the number of sockets MC can have open? Yes, but it depends on the OS and even on how a particular system is set up. A generally-safe lower bound is 20. > When MC has an open socket, does it periodically attempt to verify > whether the remote party is still present? No, TCP does that automatically. When the connection is dropped at the other end (or someplace in the middle ;-) MetaCard will get an event that will result in a "socketClosed" or "socketError" message being sent, depending on exactly what happened. > Any other comments or tips from people who are experienced using > sockets in Metacard would be appreciated. The libURL script is getting to be a little large to use as a source of examples, but it wouldn't hurt to browse through it. I also have a little telnet client that I'd be willing to send to anyone who needs examples of how to communicate with a telnet server or to get a general idea of how two hosts can communicate. Regards, Scott > Rodney > -- > -- > Rodney Tamblyn > Educational Media group > Higher Education Development Centre, 75 Union Place > University of Otago, PO Box 56, Dunedin, New Zealand > ph +64 3 479 7580 Fax +64 3 479 8362 > http://hedc.otago.ac.nz ~ http://rodney.weblogs.com Scott Raney [EMAIL PROTECTED] http://www.metacard.com MetaCard: You know, there's an easier way to do that... Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets
- Original Message - From: "Rodney Tamblyn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 26, 2001 10:08 PM Subject: sockets > I have been having fun working with sockets in Metacard, and in general everything seems to work fine. > > Some socket questions: > > When using sockets to read and write I have been using the following approach: write the length of the packet on a line followed by the data, at receiving end read for one line, then read for the supplied number of characters. What approaches do others use? You can also read without specifying a "for" condition, a specified handler will be called when data arrives. Are there any advantages/disadvantages of one approach over the other? > > In general, if you have two stacks that are going to have an ongoing series of communications going backwards and forwards, is it better to leave the socket open, or always close the socket after each communication. I've assumed the latter. Have you tried using datagram (UDP or connectionless) sockets? This causes the sent data to arrive as a parameter variable of the arrival message rather than as a data stream to be read. For example (in event sequence order): -- in the receiving stack (at IP address 11.33.55.77) -- accept datagram connections on port 5 \ with message "newConnection" -- in the sending stack (at IP address 22.44.66.88) -- put "11.33.55.77:5" into tDestination open datagram socket to tDestination write ("data data data data") to tDestination close socket tDestination -- back in the receiving stack -- on newConnection pSenderAddress, pSentData answer hostNameToAddress(hostName()) && "says:" & cr \ & pSenderAddress && "sent the following:" & cr \ & pSentData end newConnection If I got it right, the above code would display this message: 11.33.55.77 says: 22.44.66.88 sent the following: data data data data Food for thought. (I'm not sure if the "newConnection" UDP socket closes automatically or if it has to be closed with a "close" command.) Phil > > Presumably there is a limit on the number of sockets MC can have open? > > When MC has an open socket, does it periodically attempt to verify whether the remote party is still present? > > Any other comments or tips from people who are experienced using sockets in Metacard would be appreciated. > > Rodney > -- > -- > Rodney Tamblyn > Educational Media group > Higher Education Development Centre, 75 Union Place > University of Otago, PO Box 56, Dunedin, New Zealand > ph +64 3 479 7580 Fax +64 3 479 8362 > http://hedc.otago.ac.nz ~ http://rodney.weblogs.com > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets
>From: Rodney Tamblyn <[EMAIL PROTECTED]> >Subject: sockets >Date: Mon, 27 Aug 2001 17:08:59 +1200 >MIME-Version: 1.0 >Content-Type: text/plain; charset="us-ascii" > >I have been having fun working with sockets in Metacard, and in >general everything seems to work fine. > >Some socket questions: > >When using sockets to read and write I have been using the following >approach: write the length of the packet on a line followed by the >data, at receiving end read for one line, then read for the supplied >number of characters. What approaches do others use? You can also >read without specifying a "for" condition, a specified handler will >be called when data arrives. Are there any advantages/disadvantages >of one approach over the other? read from socket s with message "newData" is probably the best way...it threads the socket reading, so your program doesn't come to a halt. You just need to handle the newData message (or whatever you want to call it) which has the data and the socket. You should wrap your communications in something (i use so you know when you have all of your data (i.e. if its a bunch of data, you might get a couple of messages with only part of the info). As far as leaving them open, I tried leaving them open for short bursts...something like Computer 1 Computer 2 Request Process Request Send OK or more data if OK, close socket if data, process and send back ok or data and continue until one says "OK". Unless you are doing something high-speed like online gaming, I think that its smarter to close sockets...but I could be wrong at that.. Hope this helps! -ml > >In general, if you have two stacks that are going to have an ongoing >series of communications going backwards and forwards, is it better >to leave the socket open, or always close the socket after each >communication. I've assumed the latter. > >Presumably there is a limit on the number of sockets MC can have open? > >When MC has an open socket, does it periodically attempt to verify >whether the remote party is still present? > >Any other comments or tips from people who are experienced using >sockets in Metacard would be appreciated. > >Rodney >-- >-- >Rodney Tamblyn >Educational Media group >Higher Education Development Centre, 75 Union Place >University of Otago, PO Box 56, Dunedin, New Zealand >ph +64 3 479 7580 Fax +64 3 479 8362 >http://hedc.otago.ac.nz ~ http://rodney.weblogs.com > > -- Mark J. Luetzelschwab [EMAIL PROTECTED] Graduate Research Assistant (v) (512) 232 6034 Instructional Technology(f) (512) 232 2322 Reading and Language Arts: http://www.texasreading.org Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
sockets
I have been having fun working with sockets in Metacard, and in general everything seems to work fine. Some socket questions: When using sockets to read and write I have been using the following approach: write the length of the packet on a line followed by the data, at receiving end read for one line, then read for the supplied number of characters. What approaches do others use? You can also read without specifying a "for" condition, a specified handler will be called when data arrives. Are there any advantages/disadvantages of one approach over the other? In general, if you have two stacks that are going to have an ongoing series of communications going backwards and forwards, is it better to leave the socket open, or always close the socket after each communication. I've assumed the latter. Presumably there is a limit on the number of sockets MC can have open? When MC has an open socket, does it periodically attempt to verify whether the remote party is still present? Any other comments or tips from people who are experienced using sockets in Metacard would be appreciated. Rodney -- -- Rodney Tamblyn Educational Media group Higher Education Development Centre, 75 Union Place University of Otago, PO Box 56, Dunedin, New Zealand ph +64 3 479 7580 Fax +64 3 479 8362 http://hedc.otago.ac.nz ~ http://rodney.weblogs.com Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: Interconnecting Metacard apps via sockets...
Using different ports per stack could help here... Rest to manage which stack uses which port... Just an idea... > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of David Bovill > Sent: Wednesday, August 15, 2001 16:17 > To: [EMAIL PROTECTED] > Subject: Re: Interconnecting Metacard apps via sockets... > > > > > > From: Geoff Canyon <[EMAIL PROTECTED]> > > Subject: Re: Interconnecting Metacard apps via sockets... > > > > At 10:04 PM +0100 8/14/01, David Bovill wrote: > >>>> I am looking for a way to interconnect apps running on the > same machine (on > >>>> any platform), and thinking of using sockets. I will be > programming the > >>>> basic modules in MC, but want to leave the door open for > modules to be > >>>> coded > >>>> in other languages, and on other machines... > > > > Why are the apps separate if they are talking on the same > computer? Why not > > incorporate one into the other? > > I want to create an environment where the apps don't care where the > programmes are - and where central server resources can be > customised using > local applications. The environment also needs to allow programmes other > than those written in MC to communicate - hence sockets. I kinda > know what I > want to do - create (or use) a socket/http router with a DNS type local > database. > > Any comments on this idea - anyone done it? > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Interconnecting Metacard apps via sockets...
> From: Geoff Canyon <[EMAIL PROTECTED]> > Subject: Re: Interconnecting Metacard apps via sockets... > > At 10:04 PM +0100 8/14/01, David Bovill wrote: >>>> I am looking for a way to interconnect apps running on the same machine (on >>>> any platform), and thinking of using sockets. I will be programming the >>>> basic modules in MC, but want to leave the door open for modules to be >>>> coded >>>> in other languages, and on other machines... > > Why are the apps separate if they are talking on the same computer? Why not > incorporate one into the other? I want to create an environment where the apps don't care where the programmes are - and where central server resources can be customised using local applications. The environment also needs to allow programmes other than those written in MC to communicate - hence sockets. I kinda know what I want to do - create (or use) a socket/http router with a DNS type local database. Any comments on this idea - anyone done it? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Interconnecting Metacard apps via sockets...
At 10:04 PM +0100 8/14/01, David Bovill wrote: >>> I am looking for a way to interconnect apps running on the same machine (on >>> any platform), and thinking of using sockets. I will be programming the >>> basic modules in MC, but want to leave the door open for modules to be coded >>> in other languages, and on other machines... Why are the apps separate if they are talking on the same computer? Why not incorporate one into the other? regards, gc Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Talking to your self via sockets...
Second go at this one -:( Given that a user is online - anyone know if it is possible/the pitfalls of using sockets for Inter Application Communication (IAC) or just plain inter stack communication? Hope I'm not talking to myself here! Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Interconnecting Metacard apps via sockets...
Thanks Richard, the problem is not with how to use sockets in MC, more issue with using and routing socket connections across a variety of platforms. Stuff like: 1) What problems should I expect trying to connect two apps on the same machine (localhost)? 2) Do they have to be separate apps or can I connect stacks via sockets on the same machine? 3) Anyone worked on a software router for socket or HTTP calls? > From: Richard Gaskin <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Tue, 14 Aug 2001 10:15:50 -0700 > To: [EMAIL PROTECTED] > Subject: Re: Interconnecting Metacard apps via sockets... > > David Bovill wrote: > >> I am looking for a way to interconnect apps running on the same machine (on >> any platform), and thinking of using sockets. I will be programming the >> basic modules in MC, but want to leave the door open for modules to be coded >> in other languages, and on other machines... >> >> Anyone got any tips? > > See the documentation for the new libURL stack included with MetaCard 2.4. > > > -- > Richard Gaskin > Fourth World Media Corporation > Multimedia Design and Development for Mac, Windows, UNIX, and the Web > _ > [EMAIL PROTECTED] http://www.FourthWorld.com > Tel: 323-225-3717 ICQ#60248349Fax: 323-225-0716 > > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Interconnecting Metacard apps via sockets...
David Bovill wrote: > I am looking for a way to interconnect apps running on the same machine (on > any platform), and thinking of using sockets. I will be programming the > basic modules in MC, but want to leave the door open for modules to be coded > in other languages, and on other machines... > > Anyone got any tips? See the documentation for the new libURL stack included with MetaCard 2.4. -- Richard Gaskin Fourth World Media Corporation Multimedia Design and Development for Mac, Windows, UNIX, and the Web _ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717 ICQ#60248349Fax: 323-225-0716 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Interconnecting Metacard apps via sockets...
I am looking for a way to interconnect apps running on the same machine (on any platform), and thinking of using sockets. I will be programming the basic modules in MC, but want to leave the door open for modules to be coded in other languages, and on other machines... Anyone got any tips? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: keep-alive sockets?
Hi all, I recently tried supporting keep-alive sockets with my Metacard server app (HTTP - based originally on metacard-httpd). However, I get strange behavior. Frequently when a new request comes in, I get duplicate sockets (not always, but usually within a few minutes and a couple dozen requests). For example, openSockets() returns: 8080 127.0.0.1|2038436 127.0.0.1|2038436 Note that the second and third sockets are exactly the same! Whenever this happens, the duplicate sockets are impossible to close- calling close socket does not remove them from the openSockets. My scripts are pretty simple: when the browser sends me "Connection: Keep-Alive" in the HTTP header, I send back the same "Connection: Keep-Alive" line in my reply, and instead of closing the socket, I do something like this which will take another request on the same socket if it comes in within 60 seconds: set the socketTimeoutInterval to 6 read from socket thisSocket for 1 line with message "keepaliveconnect" Does anyone have an idea of what's going on? Bug? Feature? I'm running MacOS 9.1. Regards, Brian Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: Sockets
Phew ;-) thought it was just me. > There seems to be a problem downloading those files. BTW it looks better > in Netscape Linux now. > > Andu > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets
[EMAIL PROTECTED] wrote: > > I see said the blind man ;-) > > ...as he picked up his hammer and saw...(think it only works if you say it and not >read it) ;^P > > PS: If anyone is interested, mctools has an old Oracle SQL database connectivity >solution for MetaCard. Code is available, hopefully someone can code it for mySQL. There seems to be a problem downloading those files. BTW it looks better in Netscape Linux now. Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets
I see said the blind man ;-) ...as he picked up his hammer and saw...(think it only works if you say it and not read it) ;^P PS: If anyone is interested, mctools has an old Oracle SQL database connectivity solution for MetaCard. Code is available, hopefully someone can code it for mySQL. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: Sockets
> I would > open datagram socket to host:port with message X > > and > > on X > write tData to host:port > close datagram socket host:port > end X > > or something like that. > I see said the blind man ;-) Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets
Monte Goulding wrote: > > Hi All > > Just a few of questions: > > How do you stop accepting conections? I had a look at mchttpd and it seems > like Andu is just closing all the open sockets but does this stop new ones > from being opened? As long as you don't close the port you listen on, it keeps accepting connections on that port. > > Can someone please outline the syntax for sending a UPD datagram. The > documentation seems to be saying that you neet to: > open datagram socket to host:port > Then I guess you need to write to the socket and close it but at the same > time it says it's conectionless > Wouldn't it be a more accurate statement as follows: > write datagram tData to socket host:port > > Does this data need to be url encoded? No. I didn't do much work with UDP so I can't tell you much more then you know. I would open datagram socket to host:port with message X and on X write tData to host:port close datagram socket host:port end X or something like that. > > I guess you can only write to the socket once for a datagram??? > > I would apreciate any comments and corrections on syntax and lack of > understanding thereof ;-) > > Regards > > Monte > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets
Hi All Just a few of questions: How do you stop accepting conections? I had a look at mchttpd and it seems like Andu is just closing all the open sockets but does this stop new ones from being opened? Can someone please outline the syntax for sending a UPD datagram. The documentation seems to be saying that you neet to: open datagram socket to host:port Then I guess you need to write to the socket and close it but at the same time it says it's conectionless Wouldn't it be a more accurate statement as follows: write datagram tData to socket host:port Does this data need to be url encoded? I guess you can only write to the socket once for a datagram??? I would apreciate any comments and corrections on syntax and lack of understanding thereof ;-) Regards Monte Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
sockets - sending email attachments
Title: sockets - sending email attachments I have merged two sockets email scripts I after looking through the archives. I can get Andu's file attachment scripting to work fine except for attachments over 250k (approx) in size. Smaller attachments are sent just fine. I'm posting the header & attachment part of the script below hoping that someone can provide a clue (better yet a fix!) so it will send larger file attachments. Regards, sims # construct email header put "" into mailraw put "From: "& fld "yourname" & crlf after mailraw put "Date: "& mimedate() & crlf after mailraw put "MIME-Version: 1.0"& crlf after mailraw put "Content-Type: multipart/mixed;" & cr after mailraw put "_||-" & "2537" & random(1000) & "-||_" into tSpace ##attachment delimiter## put " boundary="& quote & tSpace & quote & cr after mailraw put "message-Id: <"& the seconds &"-"& the ticks &"@simcor>" & crlf after mailraw put "To: " & word 1 of line i of fld "addressName" & crlf after mailraw put "Subject: "& fld "subjectName" & crlf after mailraw put "--"& tSpace & cr after mailraw put "Content-Type: text/plain; charset=us-ascii"& crlf after mailraw put crlf & tBodyText & cr & cr & crlf after mailraw if fld "attachments" is empty then else put "--"& tSpace & cr after mailraw put "Content-Type: application/octet-stream; name="& quote & line 1 of\ fld "attachments" & cr after mailraw put "Content-Transfer-Encoding: base64" & cr after mailraw put "Content-Disposition: attachment; filename=" & quote & line 1 of \ fld "attachments" & quote & cr & cr after mailraw put line 1 of fld "attachments" into tAttach put line 1 of the u_Attach of this stack into tAttach put base64Encode(url tAttach) & cr & cr after mailraw end if
Re: Sockets again
andu, > > > Reading from the socket until empty is *not* the way to go. Try to > device a protocol (say like http) where you give the server a more > reliable parameter for its read, like the size of the message or some > character that would mark the end of it. > Also you can make use of "socketClosed()" to find out when the other > side disconnected (it returns the ip address as parameter). > Well, thanks for the info, but actually "socketClosed()" isn't documented anywhere (MC or Rev), and furthermore it doesn't work (at least on MC 2.3.2 for Mac)... Any other idea ? JB Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets again
jbv wrote: > > Hi boys & girls, > > Here comes the sockets thread again. > > I actually spent the afternoon scripting a small chat > program under MC and it works very well between > the various machines of our LAN (Macs, Win98 & > Linux). > > Now I want to move to larger scale prof. projects : > basically a MC app running on a server, and several > copies of a client app (on CD-ROM or downloaded > straight from a website) opening sockets with the > server. > > Here's how I see the whole thing : > - at startup, the server app would run the following > script : > accept connexions on port 8080 (sorry if the syntax > isn't the right one, but you get the idea) > then it periodically checks the opensockets property to > know how many users are connected > > - then, each client would open a socket at the IP adress > of the server, using the 8080 port. > This is the technique I used for the above mentioned > chat pgm, and it works perfectly. > > But 1 question remains in my mind : > if a client quits (ie; closes the socket), the only way for > the scripts of the server app to know it is to read from > that socket until empty, and then the IP address & port # > of that socket is automatically removed from the opensockets > list (but if the script doesn't read from that socket - which > I guess clears some buffer - the IP & # of that socket remains > in the list). In other words, if you don't read from a socket, > there's apparently no other way to know if the client has quit > or not. > I tried to check the peerAddress (naively thinking that it would > return empty if the client has quit), but it just freezed the app, > and I had to restart... > > Any more tip / suggestion regarding a more flexible sockets > management ? Reading from the socket until empty is *not* the way to go. Try to device a protocol (say like http) where you give the server a more reliable parameter for its read, like the size of the message or some character that would mark the end of it. Also you can make use of "socketClosed()" to find out when the other side disconnected (it returns the ip address as parameter). > > Thanks. > > JB > > P.S. in the above described project, several dozens of connections > might be opened by clients apps. Isn't it a risk to see the server > app slowed down dramatically, and even choke ? > Would it be wise to split the task between different servers ? > But it that case, how to manage sockets between clients apps & > the servers (especially on the matter of choosing port numbers) ? > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets again
- Original Message - From: "jbv" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 3:40 PM Subject: Sockets again > Hi boys & girls, > > Here comes the sockets thread again. > > I actually spent the afternoon scripting a small chat > program under MC and it works very well between > the various machines of our LAN (Macs, Win98 & > Linux). > > Now I want to move to larger scale prof. projects : > basically a MC app running on a server, and several > copies of a client app (on CD-ROM or downloaded > straight from a website) opening sockets with the > server. > > Here's how I see the whole thing : > - at startup, the server app would run the following > script : > accept connexions on port 8080 (sorry if the syntax > isn't the right one, but you get the idea) > then it periodically checks the opensockets property to > know how many users are connected > > - then, each client would open a socket at the IP adress > of the server, using the 8080 port. > This is the technique I used for the above mentioned > chat pgm, and it works perfectly. > > But 1 question remains in my mind : > if a client quits (ie; closes the socket), the only way for > the scripts of the server app to know it is to read from > that socket until empty, and then the IP address & port # > of that socket is automatically removed from the opensockets > list (but if the script doesn't read from that socket - which > I guess clears some buffer - the IP & # of that socket remains > in the list). In other words, if you don't read from a socket, > there's apparently no other way to know if the client has quit > or not. OR, the client stack script could contain a "closeStackRequest" handler that sends a "This is me closing now" message to the server. Like this: on closeStackRequest -- be sure to include next line, or stack won't close! pass closeStackRequest end closeStackRequest > I tried to check the peerAddress (naively thinking that it would > return empty if the client has quit), but it just freezed the app, > and I had to restart... > > Any more tip / suggestion regarding a more flexible sockets > management ? Also, you might see what difference it would make if you use UDP connections ("accept datagram connections on..." and "open datagram socket to..."). When you use datagrams, the message sent by the client arrives at the server as parameter of the 'open' request, rather than being streamed to it through an established connection between them. Hence the term "connectionless". I haven't done my own test, but it might keep things from freezing up over connection status. > Thanks. > > JB > > P.S. in the above described project, several dozens of connections > might be opened by clients apps. Isn't it a risk to see the server > app slowed down dramatically, and even choke ? > Would it be wise to split the task between different servers ? > But it that case, how to manage sockets between clients apps & > the servers (especially on the matter of choosing port numbers) ? > > > > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets again
Hi boys & girls, Here comes the sockets thread again. I actually spent the afternoon scripting a small chat program under MC and it works very well between the various machines of our LAN (Macs, Win98 & Linux). Now I want to move to larger scale prof. projects : basically a MC app running on a server, and several copies of a client app (on CD-ROM or downloaded straight from a website) opening sockets with the server. Here's how I see the whole thing : - at startup, the server app would run the following script : accept connexions on port 8080 (sorry if the syntax isn't the right one, but you get the idea) then it periodically checks the opensockets property to know how many users are connected - then, each client would open a socket at the IP adress of the server, using the 8080 port. This is the technique I used for the above mentioned chat pgm, and it works perfectly. But 1 question remains in my mind : if a client quits (ie; closes the socket), the only way for the scripts of the server app to know it is to read from that socket until empty, and then the IP address & port # of that socket is automatically removed from the opensockets list (but if the script doesn't read from that socket - which I guess clears some buffer - the IP & # of that socket remains in the list). In other words, if you don't read from a socket, there's apparently no other way to know if the client has quit or not. I tried to check the peerAddress (naively thinking that it would return empty if the client has quit), but it just freezed the app, and I had to restart... Any more tip / suggestion regarding a more flexible sockets management ? Thanks. JB P.S. in the above described project, several dozens of connections might be opened by clients apps. Isn't it a risk to see the server app slowed down dramatically, and even choke ? Would it be wise to split the task between different servers ? But it that case, how to manage sockets between clients apps & the servers (especially on the matter of choosing port numbers) ? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: multiple sockets to the same address:port
Robin-David Hammond wrote: > > It looks like the close sockets function does not accept the name of the socket, > but the host:port pair. this would make opening multiple sockes to the same port > rather difficult. I'm not sure about 2.3.x but in 2.4 you can "number" each socket like: 1.2.3.4:80|1 and 1.2.3.4:80|2... > > can someone please confirm/deny? > > - > > Robin-David Hammond > 56 Hardwick RD > Ashland MASS, USA > > "Contrary to popular belief, penguins are not the salvation of modern > technology. Neither do they throw parties for the urban proletariat." Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets info
> >On 3/23/01 2:18 AM, [EMAIL PROTECTED] wrote: > >> I've been seeing a lot of references to sockets on the list. This is one >> topic (among many) that I am completely ignorant of. Can someone point me to >> a book or site where I could read up on then and how to use them? > >Socket discussions appear more frequently nowadays, but the actual persons >involved on the discussions are rather few (and andu is the most active >person on this topic of all ;-) >Writing socket might be too complicated for xTalk developer - but it is >getting more and more important for sure. It shouldn't be complicated specially with the few examples that exist. The more time consuming and frustrating task is getting a grip on different protocols and dealing with the way some developers "chose" to implement them. I think the reluctance people have in dealing with sockets comes rather from the opacity of MacOS and Windows to such matters where all you have to do is fill out some fields in a control panel and go. This is perfectly fine for most people but developers and authors ought to make the effort to know a little more. >I wish there is a dedicated site for socket discussions and code exchange >but I've doubted how many of us will benefit for it. Simon Lord started something... and I do think it could've helped a lot: some sample scripts, the more important RFCs at hand, experiments with new protocols, etc.. >The best way to start is to perform an autopsy on andu's httpd stack, but >again even I have written a similar stack, I was having problem to >understand the stack by first glance. Unfortunately I took the good habit of commenting my scripts only recently so I am to be blamed for not making things easier for others. > >Good luck! > >> Philip > >Regards, >LiangTyan Fui > > >Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ >Info: http://www.xworlds.com/metacard/mailinglist.htm >Please send bug reports to <[EMAIL PROTECTED]>, not this list. > >. Regards, Andu ___ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets info
On 3/23/01 2:18 AM, [EMAIL PROTECTED] wrote: > I've been seeing a lot of references to sockets on the list. This is one > topic (among many) that I am completely ignorant of. Can someone point me to > a book or site where I could read up on then and how to use them? Socket discussions appear more frequently nowadays, but the actual persons involved on the discussions are rather few (and andu is the most active person on this topic of all ;-) Writing socket might be too complicated for xTalk developer - but it is getting more and more important for sure. I wish there is a dedicated site for socket discussions and code exchange but I've doubted how many of us will benefit for it. The best way to start is to perform an autopsy on andu's httpd stack, but again even I have written a similar stack, I was having problem to understand the stack by first glance. Good luck! > Philip Regards, LiangTyan Fui Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets info
> >I've been seeing a lot of references to sockets on the list. This is one topic (among many) that I am completely ignorant of. Can someone point me to a book or site where I could read up on then and how to use them? Unfortunately "sockets" hardly describes what it actually is and does in this context. Generally speaking opening, reading/writing and closing sockets are the basic operations which allow for transmitting/receiving data between 2 computers (local network or internet). You open a socket to an address (say, http://www.metacard.com on port 80) and you write a request for a file (say, index.html). The computer at the other end "listens" for requests on port 80 and when "index.html" comes in it writes the file (index.html) to the socket you opened. Next, you read from the socket the other computer's reply and optionally close the socket. Then you do whatever you want with the data received. > >Philip Regards, Andu ___ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets info
I've been seeing a lot of references to sockets on the list. This is one topic (among many) that I am completely ignorant of. Can someone point me to a book or site where I could read up on then and how to use them? Philip Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: Sockets vs. POST
> Collocation - there are quite a few major providers offering a > dedicated raq > server, running Linux for $99 a month. I'm in ;-) But there is also a cheaper company than this. For 25 pounds (after a setup fee) a company named UK2.net will give you a dedicated 10.2 GB Cobalt Raq3 server. What would that be $40-45? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
>> This is the sort of thing that you need to do with matching genetic >> sequences, so I'm sure the algorithms are out there ... > > Sounds like a job for GREP! (which MetaCard does natively) > I think it's a bit more complicated than that -:) I mean before you start testing you don't know what to match with what - where do you start? This has been sorted out, so I figure it's not worth thinking about too hard. Best probably to wait for Xavier to come back with an algorithm (if he's listening -:) >> NB: five times the hosting costs for a dedicated server works out the same >> price for 5 people if my maths is right. If you include me that leaves 3 >> more @ $20 a month. > What are you driving at? Ford Mondeo? > I surmise that you are suggesting that five people > get together and pitch in 20$ each pr month, for hosting services from a > dedicated server. Is this correct? Will this service-provider host MetaCard > CGI programs? Any restrictions? ... More details please. > Collocation - there are quite a few major providers offering a dedicated raq server, running Linux for $99 a month. So yes to all the above. For CGI hosting, Simon Lord is setting up a service for Metacard CGI's, and if I remember correctly accounts start are arranged geometrically at around $12.50 a month. Running your own dedicated MC server with the ability to define your own ports and nice simple protocols is another matter - for this you have to have a dedicated server (not a shared solution). As above these come in bigger chunks (ie around 5 times the price of a shared solution). This usually includes around 5 times the disk space, and dedicated processing power, but not a lot of help (you deal with it your self remotely). I don't have personal experience running one of these, so anyone please chip in and correct me... Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
> What would be really nice is to have something which would analyse two > text files and colourize the bits that differed. BBEdit might be just what you need. > This is the sort of thing that you need to do with matching genetic > sequences, so I'm sure the algorithms are out there ... Sounds like a job for GREP! (which MetaCard does natively) > NB: five times the hosting costs for a dedicated server works out the same > price for 5 people if my maths is right. If you include me that leaves 3 > more @ $20 a month. What are you driving at? I surmise that you are suggesting that five people get together and pitch in 20$ each pr month, for hosting services from a dedicated server. Is this correct? Will this service-provider host MetaCard CGI programs? Any restrictions? ... More details please. Alain Farmer mailto:[EMAIL PROTECTED] __ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
-- MESSAGE metacard.v004.n219.8 --- From: jbv <[EMAIL PROTECTED]> Subject: Re: Sockets vs. POST Date: Sat, 03 Mar 2001 16:23:44 + >Actually, that's what I'm planing to do. I have a few pending >projects for which the clients want a CD-ROM version + an >online version. My idea is (basically) to develop only 1 app, >on which I'll discociate the interface from the rest (core scripts >and data structures). On the CD-ROM version the interface will >be regular MC btns & flds, while the online version will >require HTML pages. The idea is to setup the small custom >protocol for communication between the core of the app and >the interface. On the CD-ROM version, this will be done by >sending messages with parameters to various handlers, and >in the online version, the same syntax will be used for >communication between the client PC (featuring the HTML >pages) and the MC app on the server. > >Any thought / previous experience & comments on this ? Thats what I am working on now...I have a graphics intensive client side (CD) that communicates with the MetaCard server (I get to host it..one of the advantages? of being on a campus with very fast connections). It will serve updates (just the URLs of the updates, I am going to use a regular old web server to hand out the actual files that get send over the net) and things like announcements and participant/trainer communications. I am writing a proposal (now) to convert the majority of the client side (minus the video, probably..but probably optional) to web pages. Extremely simple since all of my images are linked gif's anyway, and I can use the same web server to keep files current. I may choose to make them somewhat dynamic through an MC server, but I have not done any heavy load testing with it to make sure that it will keep up. Check out my sample sockets stack at: http://www.tenet.edu/teks/language_arts/testsite/downloads/mc/mc.html ..that has a simple MetaCard client->MetaCard server communication example. There is a mchttp (not mine) sample on the MetaCard site, too. The power of the sockets and the very simple scripting language makes MC a wonderful tool for this hybrid implementation. The time and cost savings over something like Java development are HUGE. And, the end result is better! -- Of course, that begs the question (as I writing the proposals) What is the ultimate machine to act as a MetaCard server? Linux? RS6000? NT? OSX? Anyone? Mark J. Luetzelschwab [EMAIL PROTECTED] Graduate Research Assistant v: (512) 232 6034 Instructional Technology f: (512) 232 2322 Center for Reading and Language Arts University of Texas at Austin Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
[EMAIL PROTECTED] : > I recommend you duke it out with the CGI protocol some more before giving up on this >relatively easy protocol. Unless, of course, you have some very special protocol >needs that CGI is not designed to handle or to handle-well. IOW, with sockets, you >could create your own custom communication protocol. A protocol that doesn't have all >of the un-necessary overhead of CGI, for example. You could conceivably create a >protocol custom-made for MetaCard stacks to communicate via the Internet in their own >native-tongue. > Very interesting remark IMHO. Actually, that's what I'm planing to do. I have a few pending projects for which the clients want a CD-ROM version + an online version. My idea is (basically) to develop only 1 app, on which I'll discociate the interface from the rest (core scripts and data structures). On the CD-ROM version the interface will be regular MC btns & flds, while the online version will require HTML pages. The idea is to setup the small custom protocol for communication between the core of the app and the interface. On the CD-ROM version, this will be done by sending messages with parameters to various handlers, and in the online version, the same syntax will be used for communication between the client PC (featuring the HTML pages) and the MC app on the server. Any thought / previous experience & comments on this ? Thanks. JB Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
> From: Richard Gaskin <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Fri, 02 Mar 2001 12:44:10 -0800 > To: [EMAIL PROTECTED] > Subject: Re: Sockets vs. POST > >> What kind of trouble? >> Trouble with extracting the posted data ? >> Trouble with the encoding of 8-bit ASCII chars ? > > Mostly that the server is reporting that the header contains invalid data. > Yesterday's error was that I'm missing a semicolon somewhere, but in > reviewing the Interarchy dump I can't find a semicolon present when I use a > browser that is not present when I make the same call from MC. :( > What would be really nice is to have something which would analyse tow text files and colourize the bits that differed. This is the sort of thing that you need to do with matching genetic sequences, so I'm sure the algorithms are out there (Xavier -:), but an nice scriptable app would be a boon. Anyone know of one? NB: five times the hosting costs for a dedicated server works out the same price for 5 people if my maths is right. If you include me that leaves 3 more @ $20 a month. I remember reading this thing about those "freeways" in the States, where everyone drives the same speed? Well in California apparently they closed one of the lanes to everyone - save those cars with 4 or more people in them; worked a treat with those willing to share zipping along - getting to work much faster. Any Californians out there? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
>> While working on some routines to send POST data to CGIs, I'm having some >> trouble getting the data in the right format... > > What kind of trouble? > Trouble with extracting the posted data ? > Trouble with the encoding of 8-bit ASCII chars ? Mostly that the server is reporting that the header contains invalid data. Yesterday's error was that I'm missing a semicolon somewhere, but in reviewing the Interarchy dump I can't find a semicolon present when I use a browser that is not present when I make the same call from MC. :( >> 1. Would it be any easier to take control over the whole transaction by >> using sockets instead of relying on MC's POST? My first hunch is that it >> would not... > > Your hunch is correct. Sockets are much more complicated because they are at a > lower level of abstraction, e.g. more details to attend to than would normally > be the case when the process is handled for you. That's encouraging. It seems silly to reproduce the whole protocol just because of header errors. >> ... but it's been a bear dealing with some CGIs. > > I recommend you duke it out with the CGI protocol some more before giving up > on this relatively easy protocol. Unless, of course, you have some very > special protocol needs that CGI is not designed to handle or to handle-well. > IOW, with sockets, you could create your own custom communication protocol. A > protocol that doesn't have all of the un-necessary overhead of CGI, for > example. You could conceivably create a protocol custom-made for MetaCard > stacks to communicate via the Internet in their own native-tongue. If only. For this project I need to perform the same calls that a browser makes, only from MC instead of a browser. For all other projects, I'd love to use MC on the server side as well, but I haven't found a shared hosting service that will let me do that. If the only alternative is to quintuple my hosting costs with colocation I'd rather just continue using Perl. -- Richard Gaskin Fourth World Media Corporation Multimedia Design and Development for Mac, Windows, UNIX, and the Web _ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717 ICQ#60248349Fax: 323-225-0716 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
> While working on some routines to send POST data to CGIs, I'm having some > trouble getting the data in the right format... What kind of trouble? Trouble with extracting the posted data ? Trouble with the encoding of 8-bit ASCII chars ? > 1. Would it be any easier to take control over the whole transaction by > using sockets instead of relying on MC's POST? My first hunch is that it > would not... Your hunch is correct. Sockets are much more complicated because they are at a lower level of abstraction, e.g. more details to attend to than would normally be the case when the process is handled for you. > ... but it's been a bear dealing with some CGIs. I recommend you duke it out with the CGI protocol some more before giving up on this relatively easy protocol. Unless, of course, you have some very special protocol needs that CGI is not designed to handle or to handle-well. IOW, with sockets, you could create your own custom communication protocol. A protocol that doesn't have all of the un-necessary overhead of CGI, for example. You could conceivably create a protocol custom-made for MetaCard stacks to communicate via the Internet in their own native-tongue. Just a random thought ;-) Alain Farmer mailto:[EMAIL PROTECTED] __ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
Richard Gaskin wrote: > > While working on some routines to send POST data to CGIs, I'm having some > trouble getting the data in the right format and it's raise two questions: > > 1. Would it be any easier to take control over the whole transaction by > using sockets instead of relying on MC's POST? Absolutely, you can send a more standards compliant header which some servers may require. Michael Kann thinks that posting the header first makes any difference which I doubt: it appears that way because of the double empty space between the header and body. Make sure you have a crlf after each line in the header and double crlf between the header and body. > My first hunch is that it > would not, but it's been a bear dealing with some CGIs. > > 2. Is there any better tool for Mac OS which will let me review all outging > and incoming data on port 80 than Interarchy? I find the format of > Interarchy's stream dumps awfully noisy, with no evident options for > reducing the displayed info to just the stream without all the commentary > junk. Interarchy allows you to uncheck any "stuff" you don't want to see: the minimum is data in ascii and hex (on the left side). > > Thanks in advance - > > -- > Richard Gaskin Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
> From: Richard Gaskin <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Thu, 01 Mar 2001 10:07:51 -0800 > To: [EMAIL PROTECTED] > Subject: Sockets vs. POST > > While working on some routines to send POST data to CGIs, I'm having some > trouble getting the data in the right format and it's raise two questions: > > 1. Would it be any easier to take control over the whole transaction by > using sockets instead of relying on MC's POST? My first hunch is that it > would not, but it's been a bear dealing with some CGIs. > Can't see how. You have to do exactly the same formatting of the string to post with Sockets as with "post" it's all down to the post protocol? using sockets would only be useful if the MC post is having problems for one reason or another, and you need to go down a level to see exactly how the CGI you are looking at requires the information - pesky little blighters! > 2. Is there any better tool for Mac OS which will let me review all outging > and incoming data on port 80 than Interarchy? I find the format of > Interarchy's stream dumps awfully noisy, with no evident options for > reducing the displayed info to just the stream without all the commentary > junk. > I know what you mean, but not that I know of what would be nice is if you could pipe this stuff through Metacard, and get MC to do the filtering. Bet you could do it on Linux though? Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
michael kann a écrit : > > I've been using HTTPtracer on Windows to monitor HTTP > traffic. It is one of the best designed programs I've > ever used. When POSTING data to PWS/ASP/Access I > noticed that I could POST from Netscape/Microsoft but > not from Metacard. With HTTPtracer I discovered that > the POST from Netscape/Microsoft actually goes in two > parts. First it POSTS the headers, then it POSTS the > data, in a following message. I concluded that > Metacard just POSTS once, so the data doesn't get > through. Thank's Michael :-) If so, the sockets approach is probably, as Andu wrote previously, the onest way to use to handle "POST" method from within mc. Regards, Pierre > > --- Richard Gaskin <[EMAIL PROTECTED]> wrote: > > While working on some routines to send POST data to > > CGIs, I'm having some > > trouble getting the data in the right format and > > it's raise two questions: > > > > 1. Would it be any easier to take control over the > > whole transaction by > > using sockets instead of relying on MC's POST? My > > first hunch is that it > > would not, but it's been a bear dealing with some > > CGIs. > > > > 2. Is there any better tool for Mac OS which will > > let me review all outging > > and incoming data on port 80 than Interarchy? I > > find the format of > > Interarchy's stream dumps awfully noisy, with no > > evident options for > > reducing the displayed info to just the stream > > without all the commentary > > junk. > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. -- Pierre Sahores WEB & VPN applications and databases servers Inspection académique de la Seine-Saint-Denis Qualifier et produire l'avantage compétitif Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets vs. POST
I've been using HTTPtracer on Windows to monitor HTTP traffic. It is one of the best designed programs I've ever used. When POSTING data to PWS/ASP/Access I noticed that I could POST from Netscape/Microsoft but not from Metacard. With HTTPtracer I discovered that the POST from Netscape/Microsoft actually goes in two parts. First it POSTS the headers, then it POSTS the data, in a following message. I concluded that Metacard just POSTS once, so the data doesn't get through. --- Richard Gaskin <[EMAIL PROTECTED]> wrote: > While working on some routines to send POST data to > CGIs, I'm having some > trouble getting the data in the right format and > it's raise two questions: > > 1. Would it be any easier to take control over the > whole transaction by > using sockets instead of relying on MC's POST? My > first hunch is that it > would not, but it's been a bear dealing with some > CGIs. > > 2. Is there any better tool for Mac OS which will > let me review all outging > and incoming data on port 80 than Interarchy? I > find the format of > Interarchy's stream dumps awfully noisy, with no > evident options for > reducing the displayed info to just the stream > without all the commentary > junk. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets vs. POST
While working on some routines to send POST data to CGIs, I'm having some trouble getting the data in the right format and it's raise two questions: 1. Would it be any easier to take control over the whole transaction by using sockets instead of relying on MC's POST? My first hunch is that it would not, but it's been a bear dealing with some CGIs. 2. Is there any better tool for Mac OS which will let me review all outging and incoming data on port 80 than Interarchy? I find the format of Interarchy's stream dumps awfully noisy, with no evident options for reducing the displayed info to just the stream without all the commentary junk. Thanks in advance - -- Richard Gaskin Fourth World Media Corporation Multimedia Design and Development for Mac, Windows, UNIX, and the Web _ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717 ICQ#60248349Fax: 323-225-0716 Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Simple Sockets?
I asked: >is there any way of finding out the IP address of the >current computer a stack is running on without making >a socket connection to another machine? Thanks for the replies from LiangTyan Fui and Michael Kann. Cheers Peter -- Peter Reid Reid-IT Limited, Loughborough, Leics., UK Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576 E-mail: [EMAIL PROTECTED] Web: http://www.reidit.co.uk Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Simple Sockets?
Peter Reid asked -- is there any way of finding out the IP address of the current computer a stack is running on without making a socket connection to another machine? -- on Windows98 I've had success with the following: on mouseUp put empty into fld "ipconfigfld" set hideConsoleWindows to true put shell("ipconfig") into vtemp filter vtemp with "*IP*" put last word of vtemp into fld "ipconfigfld" end mouseUp __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Simple Sockets?
On 1/2/01 1:44 AM, Peter Reid wrote: > Hi > > I'm just starting to experiment with very simple sockets for message > between two computers on the same TCP/IP LAN. I'm taking the scripts > posted by Kevin on 6 Nov and Mark on 1 Jan as my starting point. > > I'm hoping to use the same stack on both computers, each acting as > both a host and a client. Here are some simple/stupid questions: > > 1) is there a reverse of the "accept" command, i.e. the facility to > stop the host from accepting connections? Close the port that you have "accept" on. eg: accept connections on port "8080" with message "sockOpen" close socket "8080" > 2) is there any way of finding out the IP address of the current > computer a stack is running on without making a socket connection to > another machine? Not that I know. Regards, LiangTyan Fui > Thanks to both Kevin and Mark for helping me to get started in this area! > > Thanks for any help. > Peter Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Simple Sockets?
Hi I'm just starting to experiment with very simple sockets for message between two computers on the same TCP/IP LAN. I'm taking the scripts posted by Kevin on 6 Nov and Mark on 1 Jan as my starting point. I'm hoping to use the same stack on both computers, each acting as both a host and a client. Here are some simple/stupid questions: 1) is there a reverse of the "accept" command, i.e. the facility to stop the host from accepting connections? 2) is there any way of finding out the IP address of the current computer a stack is running on without making a socket connection to another machine? Thanks to both Kevin and Mark for helping me to get started in this area! Thanks for any help. Peter -- Peter Reid Reid-IT Limited, Loughborough, Leics., UK Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576 E-mail: [EMAIL PROTECTED] Web: http://www.reidit.co.uk Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: Sockets Made Easy .. sort of
Mark Luetzelschwab a écrit : > > Since I have been mucking around with sockets (as others on this list > have), I decided to make a simple stack that acted as both a client > and a server and could send any data between the two. > > My current plan is to make it a stack that can act as a library so I > can use it at either end and make updates to it without messing with > the rest of my stacks. > > In its current form, it lets you send data up to the stack acting as > a server, send a simple command to request data from the server, and > to send a file to the server. (remember, its the same stack, just > running on two machines...and you hit "start server" on one). The > conversation between the two continues until the client or server > says "OK"...so the server can send error messages or whatever back to > the client. > > Feel free to use it, take it apart, make it better (lots of > room).....it should be a pretty good intro for someone who is just > learning sockets, but also useful for someone who doesnt want to > learn too much about them (and just wants to move small blocks of > data between stacks). I'll post the library stack once I figure it > out for my purposes. > > Detailed instructions are on the page...but in summary...open it on > two computers, click on start server on one, type the IP of the > server into the client, then send some data! > > Download from: > > http://www.tenet.edu/teks/language_arts/testsite/downloads/mc/mc.html > > Let me know what you think. > > Mark J. Luetzelschwab [EMAIL PROTECTED] > Graduate Research Assistant (v) (512) 232 6034 > Instructional Technology(f) (512) 232 2322 > Reading and Language Arts: > http://www.texasreading.org > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. Hi Mark, Thank's a lot for doing your great socketsclientserver stack avalaible to the mc list. I have just tested it and it's realy a king size piece of mc development. I don't know how for yet but, i will probably use it as starter point for an MC VPN experimentation. Best Regards and thanks again, Pierre Sahores chef de projet cyberlibrairie SNPIN - CNDP. 91, rue Gabriel-Peri 92120 Montrouge. Tél.: 01.64.45.05.33 Penser la part du rêve et produire l'avantage compétitif. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Sockets Made Easy .. sort of
Since I have been mucking around with sockets (as others on this list have), I decided to make a simple stack that acted as both a client and a server and could send any data between the two. My current plan is to make it a stack that can act as a library so I can use it at either end and make updates to it without messing with the rest of my stacks. In its current form, it lets you send data up to the stack acting as a server, send a simple command to request data from the server, and to send a file to the server. (remember, its the same stack, just running on two machines...and you hit "start server" on one). The conversation between the two continues until the client or server says "OK"...so the server can send error messages or whatever back to the client. Feel free to use it, take it apart, make it better (lots of room).it should be a pretty good intro for someone who is just learning sockets, but also useful for someone who doesnt want to learn too much about them (and just wants to move small blocks of data between stacks). I'll post the library stack once I figure it out for my purposes. Detailed instructions are on the page...but in summary...open it on two computers, click on start server on one, type the IP of the server into the client, then send some data! Download from: http://www.tenet.edu/teks/language_arts/testsite/downloads/mc/mc.html Let me know what you think. Mark J. Luetzelschwab [EMAIL PROTECTED] Graduate Research Assistant (v) (512) 232 6034 Instructional Technology(f) (512) 232 2322 Reading and Language Arts: http://www.texasreading.org Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
On 4/11/00 10:27 am, Xavier Bury <[EMAIL PROTECTED]> wrote: > ok, but how do you read the info or request it? > suppose you know the ip and port to use only? > > does anyone have an explanation about how to read datagrams? > how do you discover the protocol? is this necessary? > > for example, i'd like to list quake servers available... > how do you go about finding this out? > > i've searched for possible info on the web but it's too polluted with > scripts, tricks and tweaks... > > a url will do surely! These games all use their own protocols, you would have to have inside information or some documentation to have any chance of figuring out how to talk to them. However, if you just want to try out sockets, a most basic example (posted previously) would be: > The following scripts work well for me in local one-machine tests. They > require two stacks: a metacard "server" stack and the client stack. You will, > of course, need to replace the "1.1.1.1" with your actual IP/domain name... > > In the server, I put: > > on openCard > accept connections on port 8080 with message gotOne > end openCard > > on gotOne theSocket > write "OK" to socket theSocket > close socket theSocket > end gotOne > > In the client: > > on openCard > checkOnline > end openCard > > on checkOnline > open socket to "1.1.1.1:8080" with message gotcha > send "checkOnline" to this card in 10 seconds > end checkOnline > > on gotcha s > read from socket s for 1 line > if (it = "OK") then put "Looks like we are online at"&&(the long time) > else answer "Looks like the server is not responding." > close socket s > end gotcha > > on socketError > answer "Looks like we are offline." > end socketError Regards, Kevin > im not refering to cgi's btw. > > Thanks > Xavier Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/> Runtime Revolution Limited (formerly Cross Worlds Computing). Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: sockets: a revelation
i'll answer my own questions... > ok, but how do you read the info or request it? > suppose you know the ip and port to use only? according to what i saw in the ftp client made with MC (listed in the www.xworlds.com contributions... What you have to do is to open the socket The port is for example 80 for a web server, 21 for ftp, etc (see the RFCs (ez to find at yahoo) for most common server formats). Other programs like game servers or particular programs (CUCME, Roger Wilco, Hotline, MSNMessenger, etc...) depend on the program. Finding those protocols and datagrams is not easy. You'll have to look for source code or sniff the packets... Source code is usually easier to find. (Debugging note: a firewall program can block your packets so make sure that they pass first. You can ping the server for example but some firewalls will block either the address (websense.com) or the ports or any combination of. Ask the net administrator at your work place. Just remember that this would imply that the program you would try to emulate would not work either since they would also be blocked.) Once you've opened the socket using the right "ip:port" url, you'll have to send it some datagrams or a message. For http, it's a message and for a quake server it's a datagram. If you dont send anything, the connection will simple open and close (right?). So you write the socket a query in http, it can be "GET,OPTIONS,etc... (thanks to Spade.org) in quake, you have to send it datagrams (thanks to Qstats and source code at http://www.activesw.com/people/steve and Luc the fragmaster at http//3d.win.be/ if you dont do that, you wont get anything... i still havent got anything from any quake servers yet but soon i hope! The FTP client is a great example on how to use the sockets and you can read it's source in the stack script. It's a good explanation of how an ftp server works! im writting a socketsbrowser, it should be ready for xmas! Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
On 4/11/00 4:02 pm, Monte Goulding <[EMAIL PROTECTED]> wrote: > This may be a bit off your topic but it's still about sockets. I have never > played with this so am just asking through curiosity. My field of study and > work is in Exercise and Sports Science. In this field (and may others I > might add) there are a lot of gadgets as you would understand that fit to > port. Is it possible to read directly from these gadgets or is this only > possible if you know the messages they are sending. Is this legal if it > side-steps software designed buy the manufacturer of the gadget. I would be > quite interested to find out this kind of info for future reference. I am > really not up to it yet. Again, this may be possible reading and writing to serial ports - it wouldn't be sockets in this case (unless these devices talk Internet protocols!). Regards, Kevin Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/> Runtime Revolution Limited (formerly Cross Worlds Computing). Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
RE: sockets: a revelation
ok, but how do you read the info or request it? suppose you know the ip and port to use only? does anyone have an explanation about how to read datagrams? how do you discover the protocol? is this necessary? for example, i'd like to list quake servers available... how do you go about finding this out? i've searched for possible info on the web but it's too polluted with scripts, tricks and tweaks... a url will do surely! im not refering to cgi's btw. Thanks Xavier > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Monte Goulding > Sent: Saturday, November 04, 2000 5:02 PM > To: [EMAIL PROTECTED] > Subject: Re: sockets: a revelation > > > > Hi > > This may be a bit off your topic but it's still about sockets. I > have never > played with this so am just asking through curiosity. My field of > study and > work is in Exercise and Sports Science. In this field (and may others I > might add) there are a lot of gadgets as you would understand that fit to > port. Is it possible to read directly from these gadgets or is this only > possible if you know the messages they are sending. Is this legal if it > side-steps software designed buy the manufacturer of the gadget. > I would be > quite interested to find out this kind of info for future reference. I am > really not up to it yet. > > Regards > > Monte > > >From: Dave Cragg <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: sockets: a revelation > >Date: Fri, 3 Nov 2000 14:16:48 + > > > >Hi all, > > > >Sorry for this rambling mail, but I just had one of those "see the > >light" experiences that leaves you feeling both like a genius and an > >idiot at the same time. > > > >Like others I guess, I've been trying to get to grips with the new > >sockets features of Metacard, and seeing how these can be used for > >various internet/intranet purposes. So I've been doing some reading > >up of various internet protocols and tried to implement some > >client-side http as part of this. > > > >Anyway, all this attention to web protocols seems to have blinded me > >to the basic concept of sockets. I've been approaching the whole > >thing with the premise that it's necesary to use established > >protocols (ftp, http, etc.) to use sockets. However, it just came to > >me that client and server programs can communicate any way they like, > >as long as they can understand each other. > > > >I have to thank Brian (Yennie) of this list for this "discovery". > >While browsing some old mails, I came across his scripts for checking > >whether a computer was still online or not. I couldn't believe it was > >that simple. ("accept connections on port 8080 with message whatever" > >and your server application is running. Come on, Scott! This is > >embarrassingly easy. Who's going to take this seriously? :)) > > > >I can see the importance of implementing established protocols if you > >need to communicate widely, for example, to apache servers from > >client Metacard programs or with web browsers from a Metacard server > >program. However, my interest is with more restricted applications. > >In particualr, with intranet-based training programs where a single > >Metacard client program has to communicate with an intranet server > >program to process results , be served lessons, tests, etc. > > > >Instead of grappling with cgi scripting, web protocols and the like, > >it seems all I have to do is put a Metacard program on an accessible > >machine, set it to accept connections, and then basically implement a > >set of matching read/write handlers at the client and server ends. A > >private protocol, so to speak. > > > >So my questions: > > > >Is it really this easy, in principle at least? > > > >What are the pitfalls? > > > >Is Metacard ready for the big time in this regard? (I.e. will it run > >all day on a server?) > > > >Aplogies if all this is blindingly obvious. > > > >Cheers > >Dave Cragg > > > >Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > >Info: http://www.xworlds.com/metacard/mailinglist.htm > >Please send bug reports to <[EMAIL PROTECTED]>, not this list. > > > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ > Info: http://www.xworlds.com/metacard/mailinglist.htm > Please send bug reports to <[EMAIL PROTECTED]>, not this list. > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
Hi This may be a bit off your topic but it's still about sockets. I have never played with this so am just asking through curiosity. My field of study and work is in Exercise and Sports Science. In this field (and may others I might add) there are a lot of gadgets as you would understand that fit to port. Is it possible to read directly from these gadgets or is this only possible if you know the messages they are sending. Is this legal if it side-steps software designed buy the manufacturer of the gadget. I would be quite interested to find out this kind of info for future reference. I am really not up to it yet. Regards Monte >From: Dave Cragg <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: sockets: a revelation >Date: Fri, 3 Nov 2000 14:16:48 + > >Hi all, > >Sorry for this rambling mail, but I just had one of those "see the >light" experiences that leaves you feeling both like a genius and an >idiot at the same time. > >Like others I guess, I've been trying to get to grips with the new >sockets features of Metacard, and seeing how these can be used for >various internet/intranet purposes. So I've been doing some reading >up of various internet protocols and tried to implement some >client-side http as part of this. > >Anyway, all this attention to web protocols seems to have blinded me >to the basic concept of sockets. I've been approaching the whole >thing with the premise that it's necesary to use established >protocols (ftp, http, etc.) to use sockets. However, it just came to >me that client and server programs can communicate any way they like, >as long as they can understand each other. > >I have to thank Brian (Yennie) of this list for this "discovery". >While browsing some old mails, I came across his scripts for checking >whether a computer was still online or not. I couldn't believe it was >that simple. ("accept connections on port 8080 with message whatever" >and your server application is running. Come on, Scott! This is >embarrassingly easy. Who's going to take this seriously? :)) > >I can see the importance of implementing established protocols if you >need to communicate widely, for example, to apache servers from >client Metacard programs or with web browsers from a Metacard server >program. However, my interest is with more restricted applications. >In particualr, with intranet-based training programs where a single >Metacard client program has to communicate with an intranet server >program to process results , be served lessons, tests, etc. > >Instead of grappling with cgi scripting, web protocols and the like, >it seems all I have to do is put a Metacard program on an accessible >machine, set it to accept connections, and then basically implement a >set of matching read/write handlers at the client and server ends. A >private protocol, so to speak. > >So my questions: > >Is it really this easy, in principle at least? > >What are the pitfalls? > >Is Metacard ready for the big time in this regard? (I.e. will it run >all day on a server?) > >Aplogies if all this is blindingly obvious. > >Cheers >Dave Cragg > >Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ >Info: http://www.xworlds.com/metacard/mailinglist.htm >Please send bug reports to <[EMAIL PROTECTED]>, not this list. > _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
> >At 10:27 AM -0500 11/3/00, andu wrote: > >>Well, if you consider a server some app that's just listening. > >Hi Andu > >I was thinking of the ease of installation, not the complexities of >the server app itself. Your http stack is a great example of this. >I'm still surprised that clicking the "Start Server" button is all >you need to have a web server running. Somehow I associate starting a >web server with configuring various files, and lots of digging around >in the OS. That tells you how complex mchttpd is;-) > >>> >>>What are the pitfalls? >> >>Only your specialized clients will ever be able to communicate with >>the server. > >True. But I wonder how many situations there are where this is all >that is needed. > >At the very least, I have new toy. :) > >Cheers >Dave > >Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ >Info: http://www.xworlds.com/metacard/mailinglist.htm >Please send bug reports to <[EMAIL PROTECTED]>, not this list. > >. Regards, Andu ___ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
At 10:27 AM -0500 11/3/00, andu wrote: >Well, if you consider a server some app that's just listening. Hi Andu I was thinking of the ease of installation, not the complexities of the server app itself. Your http stack is a great example of this. I'm still surprised that clicking the "Start Server" button is all you need to have a web server running. Somehow I associate starting a web server with configuring various files, and lots of digging around in the OS. >> >>What are the pitfalls? > >Only your specialized clients will ever be able to communicate with >the server. True. But I wonder how many situations there are where this is all that is needed. At the very least, I have new toy. :) Cheers Dave Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
Re: sockets: a revelation
> >Hi all, > >Sorry for this rambling mail, but I just had one of those "see the >light" experiences that leaves you feeling both like a genius and an >idiot at the same time. > >Like others I guess, I've been trying to get to grips with the new >sockets features of Metacard, and seeing how these can be used for >various internet/intranet purposes. So I've been doing some reading >up of various internet protocols and tried to implement some >client-side http as part of this. > >Anyway, all this attention to web protocols seems to have blinded me >to the basic concept of sockets. I've been approaching the whole >thing with the premise that it's necesary to use established >protocols (ftp, http, etc.) to use sockets. However, it just came to >me that client and server programs can communicate any way they like, >as long as they can understand each other. > >I have to thank Brian (Yennie) of this list for this "discovery". >While browsing some old mails, I came across his scripts for checking >whether a computer was still online or not. I couldn't believe it was >that simple. ("accept connections on port 8080 with message whatever" >and your server application is running. Come on, Scott! This is >embarrassingly easy. Who's going to take this seriously? :)) Well, if you consider a server some app that's just listening. > >I can see the importance of implementing established protocols if you >need to communicate widely, for example, to apache servers from >client Metacard programs or with web browsers from a Metacard server >program. However, my interest is with more restricted applications. >In particualr, with intranet-based training programs where a single >Metacard client program has to communicate with an intranet server >program to process results , be served lessons, tests, etc. > >Instead of grappling with cgi scripting, web protocols and the like, >it seems all I have to do is put a Metacard program on an accessible >machine, set it to accept connections, and then basically implement a >set of matching read/write handlers at the client and server ends. A >private protocol, so to speak. > >So my questions: > >Is it really this easy, in principle at least? Yes. > >What are the pitfalls? Only your specialized clients will ever be able to communicate with the server. > >Is Metacard ready for the big time in this regard? (I.e. will it run >all day on a server?) > >Aplogies if all this is blindingly obvious. > >Cheers >Dave Cragg Regards, Andu ___ [EMAIL PROTECTED] Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.
sockets: a revelation
Hi all, Sorry for this rambling mail, but I just had one of those "see the light" experiences that leaves you feeling both like a genius and an idiot at the same time. Like others I guess, I've been trying to get to grips with the new sockets features of Metacard, and seeing how these can be used for various internet/intranet purposes. So I've been doing some reading up of various internet protocols and tried to implement some client-side http as part of this. Anyway, all this attention to web protocols seems to have blinded me to the basic concept of sockets. I've been approaching the whole thing with the premise that it's necesary to use established protocols (ftp, http, etc.) to use sockets. However, it just came to me that client and server programs can communicate any way they like, as long as they can understand each other. I have to thank Brian (Yennie) of this list for this "discovery". While browsing some old mails, I came across his scripts for checking whether a computer was still online or not. I couldn't believe it was that simple. ("accept connections on port 8080 with message whatever" and your server application is running. Come on, Scott! This is embarrassingly easy. Who's going to take this seriously? :)) I can see the importance of implementing established protocols if you need to communicate widely, for example, to apache servers from client Metacard programs or with web browsers from a Metacard server program. However, my interest is with more restricted applications. In particualr, with intranet-based training programs where a single Metacard client program has to communicate with an intranet server program to process results , be served lessons, tests, etc. Instead of grappling with cgi scripting, web protocols and the like, it seems all I have to do is put a Metacard program on an accessible machine, set it to accept connections, and then basically implement a set of matching read/write handlers at the client and server ends. A private protocol, so to speak. So my questions: Is it really this easy, in principle at least? What are the pitfalls? Is Metacard ready for the big time in this regard? (I.e. will it run all day on a server?) Aplogies if all this is blindingly obvious. Cheers Dave Cragg Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.