<?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/7433" />

	<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>2004-05-11T01:03:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-05-11T01:03:11-04:00</updated>

		<published>2004-05-11T01:03:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36272#p36272</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36272#p36272"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36272#p36272"><![CDATA[
You should have a flush after the puts. Also, you're not sending a valid http request... there should be headers and a blank line after the headers. At the minimum you need another \n. And a flush.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue May 11, 2004 1:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-05-10T21:54:22-04:00</updated>

		<published>2004-05-10T21:54:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36269#p36269</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36269#p36269"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36269#p36269"><![CDATA[
i did thing is it doesn't do anything<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon May 10, 2004 9:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-05-09T16:21:44-04:00</updated>

		<published>2004-05-09T16:21:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36235#p36235</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36235#p36235"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36235#p36235"><![CDATA[
I already suggested not making it nonblocking... get rid of the -blocking 0 arg. I'm not sure it will work but at least try it and see what happens.<br><br>Also add some debugging statements so you can see what's happening.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun May 09, 2004 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-05-09T09:15:10-04:00</updated>

		<published>2004-05-09T09:15:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36222#p36222</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36222#p36222"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36222#p36222"><![CDATA[
now i am confused of course i am reading from it ..? the transfer of files has worked from server side like this not sur how client side manages it .. so how do you suggest i send data then retreve data ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun May 09, 2004 9:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-05-08T18:19:39-04:00</updated>

		<published>2004-05-08T18:19:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36214#p36214</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36214#p36214"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36214#p36214"><![CDATA[
Another thing -- you set the socket to be nonblocking, but then you try to read it in a while loop. Either don't make it nonblocking, or use fileevent to read from it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat May 08, 2004 6:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-08T14:01:22-04:00</updated>

		<published>2004-05-08T14:01:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36209#p36209</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36209#p36209"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36209#p36209"><![CDATA[
your string match should probably be "sock*", not "sock??" as the socket descriptor can start at a single digit number and even go past two digits..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat May 08, 2004 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-05-08T11:38:45-04:00</updated>

		<published>2004-05-08T11:38:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36204#p36204</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36204#p36204"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36204#p36204"><![CDATA[
huh ur right not sur what that is doing there .. must of been real tired last night .. hehe<br><br>but still doesn't work, but it doesn't return any errors to stdout<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat May 08, 2004 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-08T03:31:53-04:00</updated>

		<published>2004-05-08T03:31:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36193#p36193</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36193#p36193"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36193#p36193"><![CDATA[
You should have been seeing your problem on stderr (or $errorInfo)...<br><br>There is no "rfile" defined... Don't think you even want that line in there at all...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat May 08, 2004 3:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-05-08T01:58:50-04:00</updated>

		<published>2004-05-08T01:58:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36190#p36190</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36190#p36190"/>
		<title type="html"><![CDATA[socket to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36190#p36190"><![CDATA[
hey i am trying to understand how to write from a socket to a file i know i am doing something wrong but could someone point me out what it is <br><br>yes i know there is a http lib <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>#!/usr/bin/tclshproc wget {url} {  set host [lindex [split [string trimleft $url "http://"] \x2F] 0]  if {[string match -nocase *:* $host]} {    set port [lindex [split $host \x3A] 1]  } else {    set port 80  }  set path [string trimleft $url "http://$host"]  catch {socket $host $port} sock  if {[string match -nocase sock?? $sock]} {    fconfigure $sock -blocking 0 -buffering line    puts $sock "GET $path HTTP/1.1"    fconfigure $rfile -translation binary    set wfile [open [file tail $url] w]    fconfigure $wfile -translation binary    while {![eof $sock]} {      gets $sock x      if {[string match -nocase {} $x]} {        continue      }      puts $wfile "$x"    }    close $wfile  }  close $sock}wget $argv</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat May 08, 2004 1:58 am</p><hr />
]]></content>
	</entry>
	</feed>
