<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10415" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-08-30T23:50:40-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10415</id>

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T23:50:40-04:00</updated>

		<published>2005-08-30T23:50:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55076#p55076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55076#p55076"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55076#p55076"><![CDATA[
of course, you can safely use [puts] in the read handler, since Tcl will buffer output and periodically (via Tcl's event handling mechanism, invoked by eggdrop) feed the data to the operating system until it swallows it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 11:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T17:11:03-04:00</updated>

		<published>2005-08-30T17:11:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55061#p55061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55061#p55061"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55061#p55061"><![CDATA[
alternatively, you can use [socket] with -server option, then on accepting incoming connection [fconfigure] the channel for non-blocking I/O and use [fileevent] to specify your read/write handlers:<div class="codebox"><p>Code: </p><pre><code>socket -server accept 1234proc accept {chan addr port} {   fconfigure $chan -blocking 0 -buffering line   fileevent $chan readable [list foo $chan]   fileevent $chan writeable [list bar $chan]}proc foo {chan} {   # there is some data to read}proc bar {chan} {   # you can write here}</code></pre></div>(note that $chan is I/O channel, not IRC channel <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-08-30T13:22:49-04:00</updated>

		<published>2005-08-30T13:22:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55054#p55054</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55054#p55054"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55054#p55054"><![CDATA[
just use control<div class="codebox"><p>Code: </p><pre><code>set relayport [listen 4567 script foo]set relaychan #channelproc foo idx { control $idx bar}proc bar {idx var} { putserv "PRIVMSG $::relaychan :$var"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Tue Aug 30, 2005 1:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[-W0kk3L-]]></name></author>
		<updated>2005-08-30T13:17:42-04:00</updated>

		<published>2005-08-30T13:17:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55053#p55053</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55053#p55053"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55053#p55053"><![CDATA[
<blockquote class="uncited"><div>so, what's your problem?<br><br>after reading that manpage, how come you are still unable to grasp socket and connection handling in Tcl? what is it exactly that you didn't understand? you don't know how to read from, how to write to, or how to implement server socket?</div></blockquote>I don't know how to implement server socket (e.g. how to set up a listen port) and read the data from it. I think by using the command in the starttopic i can open up a socket. And as far as i can check (by sending a package to it) it works.. but i don't know how to receive the package inside eggdrop.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2750">-W0kk3L-</a> — Tue Aug 30, 2005 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T13:11:49-04:00</updated>

		<published>2005-08-30T13:11:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55052#p55052</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55052#p55052"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55052#p55052"><![CDATA[
so, what's your problem?<br><br>after reading that manpage, how come you are still unable to grasp socket and connection handling in Tcl? what is it exactly that you didn't understand? you don't know how to read from, how to write to, or how to implement server socket?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 1:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[-W0kk3L-]]></name></author>
		<updated>2005-08-30T13:04:09-04:00</updated>

		<published>2005-08-30T13:04:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55051#p55051</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55051#p55051"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55051#p55051"><![CDATA[
<blockquote class="uncited"><div>did you bother to read the whole page? there's an example at the bottom</div></blockquote>Yes, i bothered to read the whole page. And most likely i need some help with it, else i wouldn't ask for it. Please only reply if you can actually help. This is not helping me at all. I'm new to the socket stuff with tcl.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2750">-W0kk3L-</a> — Tue Aug 30, 2005 1:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T12:08:32-04:00</updated>

		<published>2005-08-30T12:08:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55045#p55045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55045#p55045"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55045#p55045"><![CDATA[
did you bother to read the whole page? there's an example at the bottom<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 12:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[-W0kk3L-]]></name></author>
		<updated>2005-08-30T11:55:39-04:00</updated>

		<published>2005-08-30T11:55:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55044#p55044</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55044#p55044"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55044#p55044"><![CDATA[
So for me that's most likely useless. I do found this one, but that says the server parameter only takes care of the connection, and not any data. (<a href="http://www.tcl.tk/man/tcl8.3/TclCmd/socket.htm" class="postlink">http://www.tcl.tk/man/tcl8.3/TclCmd/socket.htm</a>) Can you please help out, instead of sending just a link? I don't need help with coding the whole thing. I just need help with the commands, or preferably only that line (so i can receive data).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2750">-W0kk3L-</a> — Tue Aug 30, 2005 11:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T11:49:17-04:00</updated>

		<published>2005-08-30T11:49:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55042#p55042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55042#p55042"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55042#p55042"><![CDATA[
no, it's Tcl<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 11:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[-W0kk3L-]]></name></author>
		<updated>2005-08-30T11:47:34-04:00</updated>

		<published>2005-08-30T11:47:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55041#p55041</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55041#p55041"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55041#p55041"><![CDATA[
Is that TCL for eggdrop?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2750">-W0kk3L-</a> — Tue Aug 30, 2005 11:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-30T11:48:33-04:00</updated>

		<published>2005-08-30T11:46:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55040#p55040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55040#p55040"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55040#p55040"><![CDATA[
the documentation certainly has got a clue<br><br>have you heard of website named tcl.tk? or a file named tcl-commands.doc?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 30, 2005 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[-W0kk3L-]]></name></author>
		<updated>2005-08-30T11:13:41-04:00</updated>

		<published>2005-08-30T11:13:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55038#p55038</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55038#p55038"/>
		<title type="html"><![CDATA[Listening to socket]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55038#p55038"><![CDATA[
Howdi,<br><br>I'm trying to create a tcl script that listens to a specific port. I'm sending from a C program i've written, and i want all data that is send to the bot to be displayed in a specific chan. But do i need to use this?:<br><br>if {[catch {socket -myaddr "123.456.789.012" -server Server 12345} s]}<br><br>or am i using the wrong commands? Every message needs to be accepted. I will take care of security in a different way. Anyone got a clue?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2750">-W0kk3L-</a> — Tue Aug 30, 2005 11:13 am</p><hr />
]]></content>
	</entry>
	</feed>
